update lsp, keymaps, format and some other settings

This commit is contained in:
xesc 2025-02-23 19:36:05 +01:00
parent c8a9410ad7
commit 49c040e36e
25 changed files with 423 additions and 861 deletions

View file

@ -5,6 +5,7 @@ vim.api.nvim_buf_set_keymap(0, "i", "<F5>", "<esc> :exec 'w' <bar> :exec '!xelat
vim.api.nvim_buf_set_keymap(0, "v", "<F5>", "<esc> :exec 'w' <bar> :exec '!xelatex %'<cr>", {}) vim.api.nvim_buf_set_keymap(0, "v", "<F5>", "<esc> :exec 'w' <bar> :exec '!xelatex %'<cr>", {})
-- Open PDF-Viewer from LaTeX-file -- Open PDF-Viewer from LaTeX-file
vim.api.nvim_buf_set_keymap(0, "n", "cz", ":silent !zathura --fork %:r.pdf& <cr>", {})
vim.api.nvim_buf_set_keymap(0, "n", "<F6>", ":silent !zathura --fork %:r.pdf& <cr>", {}) vim.api.nvim_buf_set_keymap(0, "n", "<F6>", ":silent !zathura --fork %:r.pdf& <cr>", {})
vim.api.nvim_buf_set_keymap(0, "i", "<F6>", "<esc> :silent !zathura --fork %:r.pdf& <cr>", {}) vim.api.nvim_buf_set_keymap(0, "i", "<F6>", "<esc> :silent !zathura --fork %:r.pdf& <cr>", {})
vim.api.nvim_buf_set_keymap(0, "v", "<F6>", "<esc> :silent !zathura --fork %:r.pdf& <cr>", {}) vim.api.nvim_buf_set_keymap(0, "v", "<F6>", "<esc> :silent !zathura --fork %:r.pdf& <cr>", {})

View file

@ -24,6 +24,7 @@ require("lazy").setup({
install = { install = {
colorscheme = { "everforest" } colorscheme = { "everforest" }
}, },
change_detection = { notify = false }
}) })

View file

@ -6,3 +6,15 @@ vim.api.nvim_create_autocmd("Filetype", {
pattern = "*", pattern = "*",
command = "setlocal formatoptions-=c formatoptions-=r formatoptions-=o" command = "setlocal formatoptions-=c formatoptions-=r formatoptions-=o"
}) })
-- persistent folds
vim.api.nvim_create_autocmd({"BufWinLeave"}, {
pattern = {"*.*"},
desc = "save view (folds), when closing file",
command = "mkview",
})
vim.api.nvim_create_autocmd({"BufWinEnter"}, {
pattern = {"*.*"},
desc = "load view (folds), when opening file",
command = "silent! loadview"
})

View file

@ -19,8 +19,16 @@ vim.api.nvim_set_keymap("n", "<C-l>", "<C-w>l", {})
-- buffer operations -- buffer operations
vim.api.nvim_set_keymap("n", "<leader><tab>", "<C-^>", {}) vim.api.nvim_set_keymap("n", "<leader><tab>", "<C-^>", {})
vim.api.nvim_set_keymap("n", "<leader>bd", "<cmd>bd<cr>", {}) vim.api.nvim_set_keymap("n", "<leader>bd", "<cmd>bd<cr>", {})
vim.api.nvim_set_keymap("n", "<S-h>", "<cmd>bprevious<cr>", {})
vim.api.nvim_set_keymap("n", "<S-l>", "<cmd>bnext<cr>", {}) -- quickfix and locationlist
vim.api.nvim_set_keymap("n", "<S-h>", "<cmd>cnext<cr>zz", {})
vim.api.nvim_set_keymap("n", "<S-l>", "<cmd>cprev<cr>zz", {})
vim.api.nvim_set_keymap("n", "<leader>h", "<cmd>lnext<cr>zz", {})
vim.api.nvim_set_keymap("n", "<leader>l", "<cmd>lprev<cr>zz", {})
vim.api.nvim_set_keymap("n", "<leader>L", "<cmd>lcl<cr>", {})
vim.api.nvim_set_keymap("n", "<leader>Q", "<cmd>cw<cr>", {})
vim.api.nvim_set_keymap("n", "<leader>q", "<cmd>ccl<cr>", {})
-- moving visual blocks -- moving visual blocks
vim.api.nvim_set_keymap("v", "J", ":m '>+1<cr>gv=gv", {}) vim.api.nvim_set_keymap("v", "J", ":m '>+1<cr>gv=gv", {})

View file

@ -16,14 +16,20 @@ vim.opt.completeopt = 'menu,menuone,noselect'
vim.opt.list = true vim.opt.list = true
-- correct tabbing -- correct tabbing
vim.opt.tabstop = 2 vim.opt.tabstop = 4
vim.opt.softtabstop = 2 vim.opt.softtabstop = 4
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 4
vim.opt.expandtab = true vim.opt.expandtab = true
-- enable foldcolumn -- enable foldcolumn
vim.wo.foldcolumn = "2" vim.wo.foldcolumn = "2"
-- disable wrap
vim.opt.wrap = false
-- allow "@" in filenames
vim.opt.isfname:append("@-@")
-- smart indenting by vim -- smart indenting by vim
vim.api.nvim_set_option("smartindent",true) vim.api.nvim_set_option("smartindent",true)
@ -39,7 +45,7 @@ vim.api.nvim_set_option("background", "dark")
-- always center -- always center
-- vim.api.nvim_set_option("scrolloff",999) -- vim.api.nvim_set_option("scrolloff",999)
vim.api.nvim_set_option("scrolloff",15) vim.opt.scrolloff = 10
-- spellchecking -- spellchecking
vim.wo.spell = true vim.wo.spell = true

View file

@ -1,10 +1,10 @@
return { return {
{ {
"echasnovski/mini.pairs", "echasnovski/mini.pairs",
event = "VeryLazy", event = "VeryLazy",
version = false, version = false,
config = function() config = function()
require("mini.pairs").setup() require("mini.pairs").setup()
end, end,
} }
} }

View file

@ -1,15 +1,15 @@
return { return {
{ {
"matze/wastebin.nvim", "matze/wastebin.nvim",
config = function () config = function()
require("wastebin").setup({ require("wastebin").setup({
url = "https://bin.xesc.de", url = "https://bin.xesc.de",
open_cmd="xdg-open" open_cmd = "xdg-open"
}) })
end, end,
opts = { opts = {
vim.keymap.set("n", "<leader>wp", "<cmd>WastePaste<cr>", {silent = true}), vim.keymap.set("n", "<leader>wp", "<cmd>WastePaste<cr>", { silent = true }),
vim.keymap.set("v", "<leader>wp", "<cmd>WastePaste<cr>", {silent = true}), vim.keymap.set("v", "<leader>wp", "<cmd>WastePaste<cr>", { silent = true }),
}, },
} }
} }

View file

@ -1,8 +1,8 @@
return { return {
{ {
"echasnovski/mini.comment", "echasnovski/mini.comment",
config = function() config = function()
require("mini.comment").setup() require("mini.comment").setup()
end, end,
}, },
} }

View file

@ -1,4 +1,4 @@
return { return {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
lazy = true, lazy = true,
} }

View file

@ -1,64 +1,64 @@
return { return {
{ {
"sainnhe/everforest", "sainnhe/everforest",
priority = 1000, priority = 1000,
config = function() config = function()
-- Settings for colorscheme -- Settings for colorscheme
vim.api.nvim_set_var("everforest_background", "hard") vim.api.nvim_set_var("everforest_background", "hard")
vim.api.nvim_set_var("everforest_transparent_background", "1") vim.api.nvim_set_var("everforest_transparent_background", "1")
vim.api.nvim_set_var("everforest_ui_contrast", "low") vim.api.nvim_set_var("everforest_ui_contrast", "low")
vim.api.nvim_set_var("everforest_show_eob", "0") vim.api.nvim_set_var("everforest_show_eob", "0")
vim.api.nvim_set_var("everforest_enable_bold", "1") vim.api.nvim_set_var("everforest_enable_bold", "1")
vim.api.nvim_set_var("everforest_enable_italic", "1") vim.api.nvim_set_var("everforest_enable_italic", "1")
vim.api.nvim_set_var("everforest_better_performance", "1") vim.api.nvim_set_var("everforest_better_performance", "1")
vim.cmd([[colo everforest]]) vim.cmd([[colo everforest]])
-- Settings to override colorscheme -- Settings to override colorscheme
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"}) -- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
-- colors of tabline -- colors of tabline
vim.api.nvim_set_hl(0, "TabLine", { bg = "#272e33", fg = "#dfa000" }) vim.api.nvim_set_hl(0, "TabLine", { bg = "#272e33", fg = "#dfa000" })
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#374145" }) vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#374145" })
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
-- color of statusline -- color of statusline
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
-- color of vertical split line -- color of vertical split line
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
-- color of the cursorline and cursorlinenumber -- color of the cursorline and cursorlinenumber
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3a464c" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3a464c" })
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" }) vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
-- color of Floats and FloatBorders -- color of Floats and FloatBorders
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#9da9a0" }) vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#9da9a0" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#f85552" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#f85552" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#35a77c" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#35a77c" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
-- autocommand for overrides -- autocommand for overrides
vim.api.nvim_create_autocmd("ColorScheme", { vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "everforest", pattern = "everforest",
callback = function() callback = function()
vim.api.nvim_set_hl(0, "TabLine", { bg = "#272e33", fg = "#dfa000" }) vim.api.nvim_set_hl(0, "TabLine", { bg = "#272e33", fg = "#dfa000" })
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#374145" }) vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#374145" })
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
-- color of statusline -- color of statusline
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
-- color of vertical split line -- color of vertical split line
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
-- color of the cursorline and cursorlinenumber -- color of the cursorline and cursorlinenumber
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3c464c" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3c464c" })
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" }) vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
-- color of Floats and FloatBorders -- color of Floats and FloatBorders
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#9da9a0" }) vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#9da9a0" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#f85552" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#f85552" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#35a77c" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#35a77c" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
end,
})
end, end,
}, })
end,
},
} }

View file

@ -1,40 +1,39 @@
return { return {
{ {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
event = "VeryLazy", event = "VeryLazy",
config = function() config = function()
require('gitsigns').setup({ require('gitsigns').setup({
preview_config = { preview_config = {
border = 'rounded', border = 'rounded',
}, },
on_attach = function(bufnr) on_attach = function(bufnr)
local gs = package.loaded.gitsigns local gs = package.loaded.gitsigns
local function map(mode, l, r, opts) local function map(mode, l, r, opts)
opts = opts or {} opts = opts or {}
opts.buffer = bufnr opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts) vim.keymap.set(mode, l, r, opts)
end end
-- Navigation -- Navigation
map('n', ']c', function() map('n', ']c', function()
if vim.wo.diff then return ']c' end if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end) vim.schedule(function() gs.next_hunk() end)
return '<Ignore>' return '<Ignore>'
end, { expr = true }) end, { expr = true })
map('n', '[c', function() map('n', '[c', function()
if vim.wo.diff then return '[c' end if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end) vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>' return '<Ignore>'
end, { expr = true }) end, { expr = true })
-- Actions -- Actions
map('n', '<leader>gB', function() gs.blame_line { full = true } end) map('n', '<leader>gB', function() gs.blame_line { full = true } end)
map('n', '<leader>gb', gs.toggle_current_line_blame) map('n', '<leader>gb', gs.toggle_current_line_blame)
end
end })
}) end,
end, }
}
} }

View file

@ -1,64 +1,64 @@
return { return {
{ {
"sainnhe/gruvbox-material", "sainnhe/gruvbox-material",
lazy = true, lazy = true,
config = function() config = function()
-- Settings for colorscheme -- Settings for colorscheme
vim.api.nvim_set_var("gruvbox_material_background", "hard") vim.api.nvim_set_var("gruvbox_material_background", "hard")
vim.api.nvim_set_var("gruvbox_material_transparent_background", "1") vim.api.nvim_set_var("gruvbox_material_transparent_background", "1")
vim.api.nvim_set_var("gruvbox_material_ui_contrast", "low") vim.api.nvim_set_var("gruvbox_material_ui_contrast", "low")
vim.api.nvim_set_var("gruvbox_material_show_eob", "0") vim.api.nvim_set_var("gruvbox_material_show_eob", "0")
vim.api.nvim_set_var("gruvbox_material_enable_bold", "1") vim.api.nvim_set_var("gruvbox_material_enable_bold", "1")
vim.api.nvim_set_var("gruvbox_material_enable_italic", "1") vim.api.nvim_set_var("gruvbox_material_enable_italic", "1")
vim.api.nvim_set_var("gruvbox_material_better_performance", "1") vim.api.nvim_set_var("gruvbox_material_better_performance", "1")
vim.cmd([[colo gruvbox-material]]) vim.cmd([[colo gruvbox-material]])
-- Settings to override colorscheme -- Settings to override colorscheme
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"}) -- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
-- colors of tabline -- colors of tabline
vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" }) vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" })
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" }) vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" })
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
-- color of statusline -- color of statusline
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
-- color of vertical split line -- color of vertical split line
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
-- color of the cursorline and cursorlinenumber -- color of the cursorline and cursorlinenumber
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
-- color of Floats and FloatBorders -- color of Floats and FloatBorders
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" }) vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
-- autocommand for overrides -- autocommand for overrides
vim.api.nvim_create_autocmd("ColorScheme", { vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "gruvbox-material", pattern = "gruvbox-material",
callback = function() callback = function()
vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" }) vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" })
vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" }) vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" })
vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
-- color of statusline -- color of statusline
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
-- color of vertical split line -- color of vertical split line
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
-- color of the cursorline and cursorlinenumber -- color of the cursorline and cursorlinenumber
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" }) vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" }) vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
-- color of Floats and FloatBorders -- color of Floats and FloatBorders
vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" }) vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" })
vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" }) vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
end,
})
end, end,
}, })
end,
},
} }

View file

@ -26,10 +26,6 @@ return {
vim.keymap.set("n", "<leader>7", function() harpoon:list():select(7) end) vim.keymap.set("n", "<leader>7", function() harpoon:list():select(7) end)
vim.keymap.set("n", "<leader>8", function() harpoon:list():select(8) end) vim.keymap.set("n", "<leader>8", function() harpoon:list():select(8) end)
vim.keymap.set("n", "<leader>9", function() harpoon:list():select(9) end) vim.keymap.set("n", "<leader>9", function() harpoon:list():select(9) end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set("n", "<C-P>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<C-N>", function() harpoon:list():next() end)
end end
} }
} }

View file

@ -1,24 +1,24 @@
return { return {
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
-- event = "BufReadPre", -- event = "BufReadPre",
main = 'ibl', main = 'ibl',
config = function() config = function()
require("ibl").setup({ require("ibl").setup({
enabled = true, enabled = true,
indent = { indent = {
char = "", char = "",
smart_indent_cap = true smart_indent_cap = true
}, },
whitespace = { whitespace = {
remove_blankline_trail = true, remove_blankline_trail = true,
}, },
scope = { scope = {
exclude = { exclude = {
language = { "help", "lazy" } language = { "help", "lazy" }
} }
}, },
}) })
end, end,
}, },
} }

View file

@ -1,223 +0,0 @@
return {
{
"neovim/nvim-lspconfig",
-- event = "BufReadPre",
config = function()
require('lspconfig.ui.windows').default_options.border = 'rounded'
vim.api.nvim_set_hl(0, "LspInfoBorder", { bg = none, fg = "#9da9a0" })
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>cd', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '<space>cl', "<cmd>LspInfo<cr>", opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
-- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
local on_attach = function(client, bufnr)
-- enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
end
local border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
}
vim.diagnostic.config({
signs = { text = { [vim.diagnostic.severity.ERROR] = "", [vim.diagnostic.severity.WARN] = "", [vim.diagnostic.severity.HINT] = "", [vim.diagnostic.severity.INFO] = "" } },
float = { border = border },
virtual_text = {
prefix = '', -- Could be '●', '■', 'x', '▎', or anything else
},
update_in_insert = true,
})
-- LSP settings (for overriding per client)
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signatureHelp, { border = border })
end,
},
-- pretty ui
{
'nvimdev/lspsaga.nvim',
event = 'LspAttach',
config = function()
require('lspsaga').setup({
symbol_in_winbar = {
enable = false,
show_file = false
},
finder = {
keys = {
toggle_or_open = "<cr>",
quit = { '<Esc>', 'q' }
}
},
outline = {
win_position = 'right',
win_width = 32,
auto_preview = true,
},
lightbulb = {
enable = false
},
ui = {
code_action = '',
title = true,
border = 'rounded',
},
rename = {
in_select = false,
keys = {
quit = { '<Esc>', 'q' },
select = '<Space>'
}
},
hover_doc = {
open_cmd = '!firefox'
},
code_action = {
keys = {
quit = { '<Esc>', 'q' }
},
extend_gitsigns = false,
},
definition = {
keys = {
quit = { '<Esc>', 'q' },
},
},
diagnostic = {
border_follow = true,
extend_relatedInformation = true,
keys = {
quit = { '<Esc>', 'q' },
quit_in_show = { '<Esc>', 'q' },
}
}
})
vim.keymap.set('n', '<C-n>', "<cmd>Lspsaga term_toggle<cr>", opts)
vim.keymap.set('t', '<C-n>', "<cmd>Lspsaga term_toggle<cr>", opts)
vim.keymap.set('n', '<space>so', '<cmd>Lspsaga outline<cr>', opts)
vim.keymap.set('n', '<space>sf', '<cmd>Lspsaga finder<cr>', opts)
vim.keymap.set('n', '<space>sci', '<cmd>Lspsaga incoming_calls<cr>', opts)
vim.keymap.set('n', '<space>sco', '<cmd>Lspsaga outgoing_calls<cr>', opts)
vim.keymap.set('n', '<leader>k', '<cmd>Lspsaga hover_doc<cr>', bufopts)
vim.keymap.set('n', 'K', '<cmd>Lspsaga hover_doc<cr>', bufopts)
vim.keymap.set('n', '<space>ca', '<cmd>Lspsaga code_action<cr>', bufopts)
vim.keymap.set('n', '<space>sd', '<cmd>Lspsaga peek_definition<cr>', bufopts)
vim.keymap.set('n', '<space>st', '<cmd>Lspsaga peek_type_definition<cr>', bufopts)
vim.keymap.set('n', '<space>cw', "<cmd>Lspsaga rename mode=n<cr>", bufopts)
vim.keymap.set('n', '<space>ca', '<cmd>Lspsaga code_action<cr>', bufopts)
vim.keymap.set('n', '[e', '<cmd>Lspsaga diagnostic_jump_next<cr>', bufopts)
vim.keymap.set('n', ']e', '<cmd>Lspsaga diagnostic_jump_prev<cr>', bufopts)
end,
depedencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-tree/nvim-web-devicons'
},
},
{
"williamboman/mason.nvim",
lazy = true,
cmd = "Mason",
config = function()
require("mason").setup({
PATH = "append",
ui = {
border = "rounded",
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
end,
},
{
"williamboman/mason-lspconfig.nvim",
-- event = "BufReadPre",
config = function()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"clangd",
"rust_analyzer",
}
})
require("mason-lspconfig").setup_handlers {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {
on_attach = on_attach,
handlers = handlers,
}
end,
}
end,
},
{
"nvimtools/none-ls.nvim",
-- event = "BufReadPost",
dependencies = {
{
"nvim-telescope/telescope-ui-select.nvim",
lazy = true,
config = function()
-- This is your opts table
require("telescope").setup {
extensions = {
["ui-select"] = {
-- require("telescope.themes").get_dropdown {
-- -- even more opts
-- }
}
}
}
require("telescope").load_extension("ui-select")
end,
},
},
opts = function()
local null_ls = require('null-ls')
return {
border = 'rounded',
on_attach = function(client, bufnr)
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<space>gt', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>cA', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<space>gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>cf', function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('v', '<space>cf', function() vim.lsp.buf.format { async = true } end, bufopts)
end,
sources = {
null_ls.builtins.diagnostics.trail_space.with {
disabled_filetypes = { "lua" }
},
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.yamllint,
null_ls.builtins.formatting.yamlfmt,
null_ls.builtins.formatting.shfmt,
null_ls.builtins.formatting.shellharden,
},
}
end,
}
}

View file

@ -1,161 +1,161 @@
return { return {
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() config = function()
vim.api.nvim_set_option("showmode", false) vim.api.nvim_set_option("showmode", false)
local custom_gruvbox = require 'lualine.themes.gruvbox-material' local custom_gruvbox = require 'lualine.themes.gruvbox-material'
custom_gruvbox.normal.a.bg = '#89b482' custom_gruvbox.normal.a.bg = '#89b482'
custom_gruvbox.normal.c.bg = '' custom_gruvbox.normal.c.bg = ''
custom_gruvbox.insert.a.bg = '#d8a657' custom_gruvbox.insert.a.bg = '#d8a657'
custom_gruvbox.visual.a.bg = '#a9b665' custom_gruvbox.visual.a.bg = '#a9b665'
custom_gruvbox.replace.a.bg = '#ea6962' custom_gruvbox.replace.a.bg = '#ea6962'
local function lspsaga() local function lspsaga()
return require('lspsaga.symbol.winbar').get_bar() return require('lspsaga.symbol.winbar').get_bar()
end end
require('lualine').setup { require('lualine').setup {
options = { options = {
theme = custom_gruvbox, theme = custom_gruvbox,
globalstatus = true, globalstatus = true,
component_separators = { left = '', right = '' }, component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }, section_separators = { left = '', right = '' },
disabled_filetypes = { 'netrw', 'Trouble' }, disabled_filetypes = { 'netrw', 'Trouble' },
}, },
sections = { sections = {
lualine_a = { lualine_a = {
{ {
'mode', 'mode',
padding = 1, padding = 1,
} }
}, },
lualine_b = { lualine_b = {
{ {
'branch', 'branch',
icon = '', icon = '',
color = { fg = '#d8a657', bg = '#141617', gui = 'bold' }, color = { fg = '#d8a657', bg = '#141617', gui = 'bold' },
padding = 1, padding = 1,
}, },
{ {
'filename', 'filename',
color = { gui = 'italic', fg = '#d3869b', bg = '#1d2021' }, color = { gui = 'italic', fg = '#d3869b', bg = '#1d2021' },
padding = 1, padding = 1,
path = 1, path = 1,
}, },
}, },
lualine_c = { lualine_c = {
{ {
lspsaga lspsaga
} }
}, },
lualine_x = { lualine_x = {
{ {
'filetype', 'filetype',
color = { bg = '#1d2021', fg = '#d4be98', gui = 'italic' }, color = { bg = '#1d2021', fg = '#d4be98', gui = 'italic' },
padding = 1, padding = 1,
fmt = function(str) fmt = function(str)
return (str:gsub("^%l", string.upper)) return (str:gsub("^%l", string.upper))
end, end,
}, },
{ {
'fileformat', 'fileformat',
color = {gui = 'italic', bg = '#141617'}, color = { gui = 'italic', bg = '#141617' },
symbols = { symbols = {
unix = '(unix)', unix = '(unix)',
dos = '(dos)', dos = '(dos)',
mac = '(mac)', mac = '(mac)',
}, },
} }
}, },
lualine_y = { lualine_y = {
{ {
'diagnostics', 'diagnostics',
color = { gui = 'bold', bg = '#141617' }, color = { gui = 'bold', bg = '#141617' },
sections = { 'error', 'warn', 'info', 'hint' }, sections = { 'error', 'warn', 'info', 'hint' },
symbols = { error = "", warn = "", info = "", hint = "" }, symbols = { error = "", warn = "", info = "", hint = "" },
padding = 1, padding = 1,
update_in_insert = true update_in_insert = true
}, },
{ {
'diff', 'diff',
icon = { '', color = { bg = '#141617', fg = '#d8a657', gui = 'bold' } }, icon = { '', color = { bg = '#141617', fg = '#d8a657', gui = 'bold' } },
color = { gui = 'bold', bg = '#141617' }, color = { gui = 'bold', bg = '#141617' },
padding = 1, padding = 1,
} }
}, },
lualine_z = { lualine_z = {
{ {
'location', 'location',
padding = 1, padding = 1,
} }
} }
}, },
inactive_sections = { inactive_sections = {
lualine_a = { lualine_a = {
{ {
'mode', 'mode',
padding = 1, padding = 1,
} }
}, },
lualine_b = { lualine_b = {
{ {
'branch', 'branch',
icon = '', icon = '',
padding = 1, padding = 1,
}, },
{ {
'filename', 'filename',
padding = 1, padding = 1,
path = 1, path = 1,
} }
}, },
lualine_c = { lualine_c = {
}, },
lualine_x = { lualine_x = {
{ {
'filetype', 'filetype',
color = { gui = 'italic' }, color = { gui = 'italic' },
padding = 1, padding = 1,
fmt = function(str) fmt = function(str)
return (str:gsub("^%l", string.upper)) return (str:gsub("^%l", string.upper))
end, end,
}, },
{ {
'fileformat', 'fileformat',
color = {gui = 'italic'}, color = { gui = 'italic' },
symbols = { symbols = {
unix = 'Unix', unix = 'Unix',
dos = 'Dos', dos = 'Dos',
mac = 'Mac', mac = 'Mac',
}, },
}, },
}, },
lualine_y = { lualine_y = {
{ {
'diagnostics', 'diagnostics',
color = { gui = 'bold', bg = '#141617' }, color = { gui = 'bold', bg = '#141617' },
sections = { 'error', 'warn', 'info', 'hint' }, sections = { 'error', 'warn', 'info', 'hint' },
symbols = { error = "", warn = "", info = "", hint = "󰌶 " }, symbols = { error = "", warn = "", info = "", hint = "󰌶 " },
padding = 1, padding = 1,
update_in_insert = true update_in_insert = true
}, },
{ {
'diff', 'diff',
icon = { '', color = { bg = '#141617', gui = 'bold' } }, icon = { '', color = { bg = '#141617', gui = 'bold' } },
color = { gui = 'bold', bg = '#141617' }, color = { gui = 'bold', bg = '#141617' },
padding = 1, padding = 1,
} }
}, },
lualine_z = { lualine_z = {
{ {
'location', 'location',
padding = 1, padding = 1,
}, },
} }
}, },
} }
end, end,
}, },
} }

View file

@ -5,7 +5,7 @@ return {
opts = {}, opts = {},
config = function() config = function()
require 'marks'.setup({ require 'marks'.setup({
sign_priority = 5; sign_priority = 5,
}) })
end, end,
} }

View file

@ -1,196 +0,0 @@
return {
-- snippets
{
"L3MON4D3/LuaSnip",
lazy = true,
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
vim.api.nvim_set_hl(0, "PmenuSel", { fg = 'NONE', bg = '#272e33' })
vim.api.nvim_set_hl(0, "Pmenu", { fg = 'NONE', bg = '#1e2326' })
vim.api.nvim_set_hl(0, "CmpItemMenu", { fg = 'NONE', bg = '#272e33' })
vim.api.nvim_set_hl(0, "CmpItemMenuDefault", { fg = 'NONE', bg = '#272e33' })
vim.api.nvim_set_hl(0, "CmpItemKindFunction", { fg = '#d699b6', bg = 'NONE', italic = true })
vim.api.nvim_set_hl(0, "CmpItemKindSnippet", { fg = '#dbbc7f', bg = 'NONE', italic = true })
vim.api.nvim_set_hl(0, "CmpItemKindText", { fg = '#9da9a0', bg = 'NONE', italic = true })
vim.api.nvim_set_hl(0, "CmpItemKindVariable", { fg = '#7fbbb3', bg = 'NONE', italic = true })
end,
},
},
-- completion
{
"hrsh7th/nvim-cmp",
version = false,
event = {
-- "InsertEnter",
-- "CmdlineEnter",
"BufWinEnter",
},
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"saadparwaiz1/cmp_luasnip",
},
opts = function()
-- Set up nvim-cmp with luasnip
local kind_icons = {
Text = "",
Method = "󰆧",
Function = "󰊕",
Constructor = "",
Field = "󰇽",
Variable = "󰂡",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈙",
Reference = "",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "",
Event = "",
Operator = "󰆕",
TypeParameter = "󰅲"
}
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
return {
formatting = {
format = function(entry, vim_item)
-- Kind icons
vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
-- Source
vim_item.menu = ({
-- buffer = "[Buffer]",
-- nvim_lsp = "[LSP]",
-- luasnip = "[LuaSnip]",
-- nvim_lua = "[Lua]",
-- latex_symbols = "[LaTeX]",
buffer = "",
nvim_lsp = "",
luasnip = "",
nvim_lua = "",
latex_symbols = "",
})[entry.source.name]
return vim_item
end
},
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
},
-- completion = {
-- autocomplete = false,
-- },
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- ['<C-Space>'] = cmp.mapping.complete(),
-- ['<C-e>'] = cmp.mapping.abort(),
['<C-e>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.abort()
else
cmp.complete()
end
end),
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- they way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
-- { name = 'vsnip' }, -- For vsnip users.
{ name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
{
name = 'buffer',
option = {
get_bufnrs = function()
return vim.api.nvim_list_bufs()
end
},
},
}, {
}),
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
}),
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
}),
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
}),
}
end,
}
}

View file

@ -1,6 +1,6 @@
return { return {
{ {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
lazy = true, lazy = true,
}, },
} }

View file

@ -1,14 +1,14 @@
return { return {
{ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
event = "VeryLazy", event = "VeryLazy",
config = function () config = function()
require('treesitter-context').setup{ require('treesitter-context').setup {
enable = true, enable = true,
max_lines = 0, max_lines = 0,
min_window_height = 0, min_window_height = 0,
line_numbers = true, line_numbers = true,
} }
end end
} }
} }

View file

@ -45,7 +45,7 @@ return {
-- mapping query_strings to modes. -- mapping query_strings to modes.
selection_modes = { selection_modes = {
['@parameter.outer'] = 'v', -- charwise ['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise ['@function.outer'] = 'V', -- linewise
}, },
-- If you set this to `true` (default is `false`) then any textobject is -- If you set this to `true` (default is `false`) then any textobject is
-- extended to include preceding or succeeding whitespace. Succeeding -- extended to include preceding or succeeding whitespace. Succeeding

View file

@ -1,32 +1,32 @@
return { return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
version = false, version = false,
build = ":TSUpdate", build = ":TSUpdate",
-- event = "BufReadPre", -- event = "BufReadPre",
opts = { opts = {
ensure_installed = { ensure_installed = {
"c", "c",
"lua", "lua",
"rust", "rust",
"latex", "latex",
"bibtex", "bibtex",
"python", "python",
"vim", "vim",
"yaml", "yaml",
"json", "json",
}, },
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,
disable = { disable = {
"markdown", "markdown",
},
},
}, },
config = function(_, opts) },
require("nvim-treesitter.configs").setup(opts) },
end, config = function(_, opts)
} require("nvim-treesitter.configs").setup(opts)
end,
}
} }

View file

@ -1,41 +0,0 @@
return {
{
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>xs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>xl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}
}

View file

@ -1,14 +1,13 @@
return { return {
{ {
"mbbill/undotree", "mbbill/undotree",
keys = { keys = {
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "toggle undotree" }, { "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "toggle undotree" },
}, },
config = function() config = function()
vim.g.undotree_WindowLayout = 4 vim.g.undotree_WindowLayout = 4
vim.g.undotree_SplitWidth = 40 vim.g.undotree_SplitWidth = 40
vim.g.undotree_SetFocusWhenToggle = 1 vim.g.undotree_SetFocusWhenToggle = 1
end end
} }
} }

View file

@ -4,7 +4,7 @@ return {
opts = { opts = {
window = { window = {
backdrop = 1, backdrop = 1,
width = 101, width = 120,
}, },
plugins = { plugins = {
options = { options = {