📦 Projects and plugins

- Adds Projects option
- Reorganize plugins
This commit is contained in:
2024-07-13 11:52:54 -04:00
parent 25e4ffc62d
commit 196d3ee59e
32 changed files with 375 additions and 447 deletions
+1 -22
View File
@@ -72,28 +72,7 @@ vim.g.loaded_perl_provider = 0
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.dap.nlua" },
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.util.chezmoi" },
{ import = "lazyvim.plugins.extras.editor.aerial" },
{ import = "lazyvim.plugins.extras.editor.dial" },
{ import = "lazyvim.plugins.extras.editor.illuminate" },
{ import = "lazyvim.plugins.extras.editor.outline" },
{ import = "lazyvim.plugins.extras.coding.codeium" },
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "lazyvim.plugins.extras.util.gitui" },
{ import = "lazyvim.plugins.extras.util.octo" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.git" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.editor.telescope" },
{ import = "ui" },
{ import = "plugins" },
{ import = "themes" },
},
-8
View File
@@ -1,8 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- ANSI-escape ---------------------------------
-- -----------------------------------------------------------------------------
return {
"vim-scripts/AnsiEsc.vim",
lazy = true,
}
-10
View File
@@ -1,10 +0,0 @@
-- -----------------------------------------------------------------------------
-- -------------------------------- auto-save ----------------------------------
-- -----------------------------------------------------------------------------
return {
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup({})
end,
}
-16
View File
@@ -1,16 +0,0 @@
-- -----------------------------------------------------------------------------
-- -------------------------------- CodeSnap -----------------------------------
-- -----------------------------------------------------------------------------
return {
"mistricky/codesnap.nvim",
build = "make",
opts = {
save_path = "~/Pictures/Screenshots/",
has_breadcrumbs = true,
show_workspace = true,
bg_theme = "default",
watermark = "Rootiest Snippets",
code_font_family = "Iosevka NF",
code_font_size = 12,
},
}
-34
View File
@@ -1,34 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- CodeWindow ----------------------------------
-- -----------------------------------------------------------------------------
return {
"gorbit99/codewindow.nvim",
version = false,
config = function()
require("codewindow").setup({
active_in_terminals = false, -- Should the minimap activate for terminal buffers
auto_enable = true, -- Automatically open the minimap when entering a (non-excluded) buffer (accepts a table of filetypes)
exclude_filetypes = { "help", "dashboard" }, -- Choose certain filetypes to not show minimap on
max_minimap_height = nil, -- The maximum height the minimap can take (including borders)
max_lines = nil, -- If auto_enable is true, don't open the minimap for buffers which have more than this many lines.
minimap_width = 10, -- The width of the text part of the minimap
use_lsp = true, -- Use the builtin LSP to show errors and warnings
use_treesitter = true, -- Use nvim-treesitter to highlight the code
use_git = true, -- Show small dots to indicate git additions and deletions
width_multiplier = 4, -- How many characters one dot represents
z_index = 1, -- The z-index the floating window will be on
show_cursor = true, -- Show the cursor position in the minimap
screen_bounds = "background", -- How the visible area is displayed, "lines": lines above and below, "background": background color
window_border = "none", -- The border style of the floating window (accepts all usual options)
relative = "win", -- What will be the minimap be placed relative to, "win": the curre
events = {
"TextChanged",
"InsertLeave",
"DiagnosticChanged",
"FileWritePost",
}, -- Events that update the code window
})
require("codewindow").apply_default_keybinds()
end,
}
+38
View File
@@ -0,0 +1,38 @@
return {
{ import = "lazyvim.plugins.extras.coding.codeium" },
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
{
"norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup()
end,
},
{
"vim-scripts/AnsiEsc.vim",
lazy = true,
},
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end,
},
{
"shellRaining/hlchunk.nvim",
lazy = false,
config = function()
require("hlchunk").setup({
chunk = {
style = {
{ fg = "#90FDA9" },
},
enable = true,
},
indent = {
enable = true,
},
})
end,
},
}
-9
View File
@@ -1,9 +0,0 @@
-- -----------------------------------------------------------------------------
-- -------------------------------- Colorizer ----------------------------------
-- -----------------------------------------------------------------------------
return {
"norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup()
end,
}
-10
View File
@@ -1,10 +0,0 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- Comment -----------------------------------
-- -----------------------------------------------------------------------------
return {
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end,
}
+4
View File
@@ -0,0 +1,4 @@
return {
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.dap.nlua" },
}
-32
View File
@@ -1,32 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- DeadColumn ----------------------------------
-- -----------------------------------------------------------------------------
return {
"Bekaboo/deadcolumn.nvim",
config = function()
require("deadcolumn").setup({
scope = "line", ---@type string|fun(): integer
---@type string[]|fun(mode: string): boolean
modes = function(mode)
return mode:find("^[ictRss\x13]") ~= nil
end,
blending = {
threshold = 0.9,
colorcode = "#737895",
hlgroup = { "Normal", "bg" },
},
warning = {
alpha = 0.4,
offset = 0,
colorcode = "#f27b82",
hlgroup = { "Error", "bg" },
},
extra = {
---@type string?
follow_tw = "80",
},
})
vim.cmd(":set colorcolumn=120")
end,
}
+80
View File
@@ -0,0 +1,80 @@
return {
{ import = "lazyvim.plugins.extras.editor.aerial" },
{ import = "lazyvim.plugins.extras.editor.dial" },
{ import = "lazyvim.plugins.extras.editor.illuminate" },
{ import = "lazyvim.plugins.extras.editor.outline" },
{ import = "lazyvim.plugins.extras.editor.telescope" },
{
"gorbit99/codewindow.nvim",
version = false,
config = function()
require("codewindow").setup({
active_in_terminals = false, -- Should the minimap activate for terminal buffers
auto_enable = true, -- Automatically open the minimap when entering a (non-excluded) buffer (accepts a table of filetypes)
exclude_filetypes = { "help", "dashboard" }, -- Choose certain filetypes to not show minimap on
max_minimap_height = nil, -- The maximum height the minimap can take (including borders)
max_lines = nil, -- If auto_enable is true, don't open the minimap for buffers which have more than this many lines.
minimap_width = 10, -- The width of the text part of the minimap
use_lsp = true, -- Use the builtin LSP to show errors and warnings
use_treesitter = true, -- Use nvim-treesitter to highlight the code
use_git = true, -- Show small dots to indicate git additions and deletions
width_multiplier = 4, -- How many characters one dot represents
z_index = 1, -- The z-index the floating window will be on
show_cursor = true, -- Show the cursor position in the minimap
screen_bounds = "background", -- How the visible area is displayed, "lines": lines above and below, "background": background color
window_border = "none", -- The border style of the floating window (accepts all usual options)
relative = "win", -- What will be the minimap be placed relative to, "win": the curre
events = {
"TextChanged",
"InsertLeave",
"DiagnosticChanged",
"FileWritePost",
}, -- Events that update the code window
})
require("codewindow").apply_default_keybinds()
end,
},
{
"folke/persistence.nvim",
event = "BufReadPre",
opts = {},
},
{
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = true,
},
{
"Bekaboo/deadcolumn.nvim",
config = function()
require("deadcolumn").setup({
scope = "line", ---@type string|fun(): integer
---@type string[]|fun(mode: string): boolean
modes = function(mode)
return mode:find("^[ictRss\x13]") ~= nil
end,
blending = {
threshold = 0.9,
colorcode = "#737895",
hlgroup = { "Normal", "bg" },
},
warning = {
alpha = 0.4,
offset = 0,
colorcode = "#f27b82",
hlgroup = { "Error", "bg" },
},
extra = {
---@type string?
follow_tw = "80",
},
})
vim.cmd(":set colorcolumn=120")
end,
},
}
-17
View File
@@ -1,17 +0,0 @@
-- -----------------------------------------------------------------------------
-- ---------------------------------- Gists ------------------------------------
-- -----------------------------------------------------------------------------
return {
{
"Rawnly/gist.nvim",
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
config = true,
},
{
"samjwill/nvim-unception",
lazy = false,
init = function()
vim.g.unception_block_while_host_edits = true
end,
},
}
-12
View File
@@ -1,12 +0,0 @@
-- -----------------------------------------------------------------------------
-- ----------------------------------- gx --------------------------------------
-- -----------------------------------------------------------------------------
return {
"chrishrb/gx.nvim",
cmd = { "Browse" },
init = function()
vim.g.netrw_nogx = 1
end,
dependencies = { "nvim-lua/plenary.nvim" },
config = true,
}
-21
View File
@@ -1,21 +0,0 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- hlchunk -----------------------------------
-- -----------------------------------------------------------------------------
return {
"shellRaining/hlchunk.nvim",
lazy = false,
config = function()
require("hlchunk").setup({
chunk = {
style = {
{ fg = "#90FDA9" },
},
enable = true,
},
indent = {
enable = true,
},
})
end,
}
-9
View File
@@ -1,9 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- Icon Picker ---------------------------------
-- -----------------------------------------------------------------------------
return {
"ziontee113/icon-picker.nvim",
config = function()
require("icon-picker").setup({ disable_legacy_commands = true })
end,
}
-27
View File
@@ -1,27 +0,0 @@
-- -----------------------------------------------------------------------------
-- ----------------------------- kitty-navigator -------------------------------
-- -----------------------------------------------------------------------------
-- return {
-- "knubie/vim-kitty-navigator",
-- build = {
-- "cp ./*.py ~/.config/kitty/",
-- },
-- cond = function() -- Using Kitty
-- local term = os.getenv("TERM") or ""
-- local kit = string.find(term, "kitty")
-- return kit ~= nil
-- end,
-- }
return {
"MunsMan/kitty-navigator.nvim",
build = {
"cp navigate_kitty.py ~/.config/kitty",
"cp pass_keys.py ~/.config/kitty",
},
cond = function() -- Using Kitty
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")
return kit ~= nil
end,
}
-11
View File
@@ -1,11 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------ kitty-runner ---------------------------------
-- -----------------------------------------------------------------------------
return {
"jghauser/kitty-runner.nvim",
cond = function() -- Using Kitty
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")
return kit ~= nil
end,
}
-17
View File
@@ -1,17 +0,0 @@
-- -----------------------------------------------------------------------------
-- ---------------------------- kitty-scrollback -------------------------------
-- -----------------------------------------------------------------------------
return {
"mikesmithgh/kitty-scrollback.nvim",
enabled = true,
lazy = true,
cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" },
event = { "User KittyScrollbackLaunch" },
version = "*",
config = function() -- Using Kitty-Scrollback
if vim.env.KITTY_SCROLLBACK_NVIM == "true" then
require("kitty-scrollback").setup()
end
end,
}
+9
View File
@@ -0,0 +1,9 @@
return {
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.git" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
}
-16
View File
@@ -1,16 +0,0 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- LazyGit -----------------------------------
-- -----------------------------------------------------------------------------
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
dependencies = {
"nvim-lua/plenary.nvim",
},
}
-9
View File
@@ -1,9 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- Persistence ---------------------------------
-- -----------------------------------------------------------------------------
return {
"folke/persistence.nvim",
event = "BufReadPre",
opts = {},
}
-14
View File
@@ -1,14 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- remote-nvim ---------------------------------
-- -----------------------------------------------------------------------------
return {
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = true,
}
-8
View File
@@ -1,8 +0,0 @@
-- -----------------------------------------------------------------------------
-- ----------------------------- rip-substitute --------------------------------
-- -----------------------------------------------------------------------------
return {
"chrisgrieser/nvim-rip-substitute",
cmd = "RipSubstitute",
}
-86
View File
@@ -1,86 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------ SmoothCursor ---------------------------------
-- -----------------------------------------------------------------------------
return {
"gen740/SmoothCursor.nvim",
config = function()
require("smoothcursor").setup({
type = "default",
cursor = "",
texthl = "SmoothCursor",
fancy = {
enable = true, -- enable fancy mode
head = { cursor = "", texthl = nil, linehl = nil },
body = {},
tail = { false }, -- false to disable fancy tail
},
matrix = { -- Loaded when 'type' is set to "matrix"
head = {
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursor",
},
linehl = nil, -- No line highlight for the head
},
body = {
length = 6, -- Specifies the length of the cursor body
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursorGreen",
},
},
tail = {
cursor = nil,
texthl = {
"SmoothCursor",
},
},
unstop = false,
},
autostart = true, -- Automatically start SmoothCursor
always_redraw = true, -- Redraw the screen on each update
flyin_effect = nil, -- Choose "bottom" or "top" for flying effect
speed = 25, -- Max speed is 100 to stick with your current position
intervals = 35, -- Update intervals in milliseconds
priority = 10, -- Set marker priority
timeout = 3000, -- Timeout for animations in milliseconds
threshold = 3, -- Animate only if cursor moves more than this many lines
max_threshold = 2000, -- If you move more than this many lines, don't animate (if `nil`, deactivate check)
disable_float_win = false, -- Disable in floating windows
enabled_filetypes = nil, -- Enable only for specific file types, e.g., { "lua", "vim" }
disabled_filetypes = nil, -- Disable for these file types
show_last_positions = nil,
})
-- Define cursor color/icon based on mode
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "ModeChanged", "BufEnter" }, {
callback = function()
local current_mode = vim.fn.mode()
if current_mode == "n" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8aa8f3" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "v" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "V" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "i" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#9bd482" })
vim.fn.sign_define("smoothcursor", { text = "" })
end
end,
})
-- Define last cursor position icon
vim.fn.sign_define("smoothcursor_n", { text = "" })
vim.fn.sign_define("smoothcursor_v", { text = "" })
vim.fn.sign_define("smoothcursor_V", { text = "" })
vim.fn.sign_define("smoothcursor_i", { text = "" })
vim.fn.sign_define("smoothcursor_", { text = "" })
vim.fn.sign_define("smoothcursor_R", { text = "󰊄" })
end,
}
-44
View File
@@ -1,44 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- ToggleTerm ----------------------------------
-- -----------------------------------------------------------------------------
return {
"akinsho/toggleterm.nvim",
version = false,
lazy = false,
config = function()
require("toggleterm").setup({
-- size can be a number or function which is passed the current terminal
size = function(term)
if term.direction == "horizontal" then
return 10
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,
open_mapping = [[<c-\>]],
hide_numbers = true,
autochdir = true,
shade_terminals = false,
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
persist_mode = true,
direction = "horizontal",
close_on_exit = true,
shell = vim.o.shell,
auto_scroll = true,
float_opts = {
border = "curved",
winblend = 3,
title_pos = "left",
},
winbar = {
enabled = true,
name_formatter = function(term) -- term: Terminal
return term.name
end,
},
})
end,
}
-8
View File
@@ -1,8 +0,0 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- Transparent ---------------------------------
-- -----------------------------------------------------------------------------
return {
"xiyaowong/transparent.nvim",
config = true,
}
-7
View File
@@ -1,7 +0,0 @@
-- -----------------------------------------------------------------------------
-- --------------------------- User-getting-bored ------------------------------
-- -----------------------------------------------------------------------------
return {
"mikesmithgh/ugbi",
lazy = false,
}
+77
View File
@@ -0,0 +1,77 @@
return {
{
import = "lazyvim.plugins.extras.util.project",
opts = { manual_mode = false },
},
{ import = "lazyvim.plugins.extras.util.chezmoi" },
{ import = "lazyvim.plugins.extras.util.dot" },
{ import = "lazyvim.plugins.extras.util.gitui" },
{ import = "lazyvim.plugins.extras.util.octo" },
{
"chrishrb/gx.nvim",
cmd = { "Browse" },
init = function()
vim.g.netrw_nogx = 1
end,
dependencies = { "nvim-lua/plenary.nvim" },
config = true,
},
{
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup({})
end,
},
{
"mikesmithgh/ugbi",
lazy = false,
},
{
"chrisgrieser/nvim-rip-substitute",
cmd = "RipSubstitute",
},
{
"Rawnly/gist.nvim",
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
config = true,
},
{
"samjwill/nvim-unception",
lazy = false,
init = function()
vim.g.unception_block_while_host_edits = true
end,
},
{
"ziontee113/icon-picker.nvim",
config = function()
require("icon-picker").setup({ disable_legacy_commands = true })
end,
},
{
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
dependencies = {
"nvim-lua/plenary.nvim",
},
},
{
"mistricky/codesnap.nvim",
build = "make",
opts = {
save_path = "~/Pictures/Screenshots/",
has_breadcrumbs = true,
show_workspace = true,
bg_theme = "default",
watermark = "Rootiest Snippets",
code_font_family = "Iosevka NF",
code_font_size = 12,
},
},
}
+35
View File
@@ -0,0 +1,35 @@
return {
{
"MunsMan/kitty-navigator.nvim",
build = {
"cp navigate_kitty.py ~/.config/kitty",
"cp pass_keys.py ~/.config/kitty",
},
cond = function() -- Using Kitty
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")
return kit ~= nil
end,
},
{
"jghauser/kitty-runner.nvim",
cond = function() -- Using Kitty
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")
return kit ~= nil
end,
},
{
"mikesmithgh/kitty-scrollback.nvim",
enabled = true,
lazy = true,
cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" },
event = { "User KittyScrollbackLaunch" },
version = "*",
config = function() -- Using Kitty-Scrollback
if vim.env.KITTY_SCROLLBACK_NVIM == "true" then
require("kitty-scrollback").setup()
end
end,
},
}
+131
View File
@@ -0,0 +1,131 @@
return {
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
{
"xiyaowong/transparent.nvim",
config = true,
},
{
"gen740/SmoothCursor.nvim",
config = function()
require("smoothcursor").setup({
type = "default",
cursor = "",
texthl = "SmoothCursor",
fancy = {
enable = true, -- enable fancy mode
head = { cursor = "", texthl = nil, linehl = nil },
body = {},
tail = { false }, -- false to disable fancy tail
},
matrix = { -- Loaded when 'type' is set to "matrix"
head = {
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursor",
},
linehl = nil, -- No line highlight for the head
},
body = {
length = 6, -- Specifies the length of the cursor body
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursorGreen",
},
},
tail = {
cursor = nil,
texthl = {
"SmoothCursor",
},
},
unstop = false,
},
autostart = true, -- Automatically start SmoothCursor
always_redraw = true, -- Redraw the screen on each update
flyin_effect = nil, -- Choose "bottom" or "top" for flying effect
speed = 25, -- Max speed is 100 to stick with your current position
intervals = 35, -- Update intervals in milliseconds
priority = 10, -- Set marker priority
timeout = 3000, -- Timeout for animations in milliseconds
threshold = 3, -- Animate only if cursor moves more than this many lines
max_threshold = 2000, -- If you move more than this many lines, don't animate (if `nil`, deactivate check)
disable_float_win = false, -- Disable in floating windows
enabled_filetypes = nil, -- Enable only for specific file types, e.g., { "lua", "vim" }
disabled_filetypes = nil, -- Disable for these file types
show_last_positions = nil,
})
-- Define cursor color/icon based on mode
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "ModeChanged", "BufEnter" }, {
callback = function()
local current_mode = vim.fn.mode()
if current_mode == "n" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8aa8f3" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "v" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "V" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "i" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#9bd482" })
vim.fn.sign_define("smoothcursor", { text = "" })
end
end,
})
-- Define last cursor position icon
vim.fn.sign_define("smoothcursor_n", { text = "" })
vim.fn.sign_define("smoothcursor_v", { text = "" })
vim.fn.sign_define("smoothcursor_V", { text = "" })
vim.fn.sign_define("smoothcursor_i", { text = "" })
vim.fn.sign_define("smoothcursor_", { text = "" })
vim.fn.sign_define("smoothcursor_R", { text = "󰊄" })
end,
},
{
"akinsho/toggleterm.nvim",
version = false,
lazy = false,
config = function()
require("toggleterm").setup({
-- size can be a number or function which is passed the current terminal
size = function(term)
if term.direction == "horizontal" then
return 10
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,
open_mapping = [[<c-\>]],
hide_numbers = true,
autochdir = true,
shade_terminals = false,
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
persist_mode = true,
direction = "horizontal",
close_on_exit = true,
shell = vim.o.shell,
auto_scroll = true,
float_opts = {
border = "curved",
winblend = 3,
title_pos = "left",
},
winbar = {
enabled = true,
name_formatter = function(term) -- term: Terminal
return term.name
end,
},
})
end,
},
}