update lsp, keymaps, format and some other settings
This commit is contained in:
parent
c8a9410ad7
commit
49c040e36e
25 changed files with 423 additions and 861 deletions
|
@ -6,3 +6,15 @@ vim.api.nvim_create_autocmd("Filetype", {
|
|||
pattern = "*",
|
||||
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"
|
||||
})
|
||||
|
|
|
@ -19,8 +19,16 @@ vim.api.nvim_set_keymap("n", "<C-l>", "<C-w>l", {})
|
|||
-- buffer operations
|
||||
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", "<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
|
||||
vim.api.nvim_set_keymap("v", "J", ":m '>+1<cr>gv=gv", {})
|
||||
|
|
|
@ -16,14 +16,20 @@ vim.opt.completeopt = 'menu,menuone,noselect'
|
|||
vim.opt.list = true
|
||||
|
||||
-- correct tabbing
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- enable foldcolumn
|
||||
vim.wo.foldcolumn = "2"
|
||||
|
||||
-- disable wrap
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- allow "@" in filenames
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
-- smart indenting by vim
|
||||
vim.api.nvim_set_option("smartindent",true)
|
||||
|
||||
|
@ -39,7 +45,7 @@ vim.api.nvim_set_option("background", "dark")
|
|||
|
||||
-- always center
|
||||
-- vim.api.nvim_set_option("scrolloff",999)
|
||||
vim.api.nvim_set_option("scrolloff",15)
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- spellchecking
|
||||
vim.wo.spell = true
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.pairs").setup()
|
||||
end,
|
||||
}
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
version = false,
|
||||
config = function()
|
||||
require("mini.pairs").setup()
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
return {
|
||||
{
|
||||
"matze/wastebin.nvim",
|
||||
config = function ()
|
||||
config = function()
|
||||
require("wastebin").setup({
|
||||
url = "https://bin.xesc.de",
|
||||
open_cmd="xdg-open"
|
||||
open_cmd = "xdg-open"
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
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("n", "<leader>wp", "<cmd>WastePaste<cr>", { silent = true }),
|
||||
vim.keymap.set("v", "<leader>wp", "<cmd>WastePaste<cr>", { silent = true }),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
config = function()
|
||||
require("mini.comment").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
config = function()
|
||||
require("mini.comment").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
return {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true,
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
return {
|
||||
{
|
||||
"sainnhe/everforest",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Settings for colorscheme
|
||||
vim.api.nvim_set_var("everforest_background", "hard")
|
||||
vim.api.nvim_set_var("everforest_transparent_background", "1")
|
||||
vim.api.nvim_set_var("everforest_ui_contrast", "low")
|
||||
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_italic", "1")
|
||||
vim.api.nvim_set_var("everforest_better_performance", "1")
|
||||
vim.cmd([[colo everforest]])
|
||||
{
|
||||
"sainnhe/everforest",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Settings for colorscheme
|
||||
vim.api.nvim_set_var("everforest_background", "hard")
|
||||
vim.api.nvim_set_var("everforest_transparent_background", "1")
|
||||
vim.api.nvim_set_var("everforest_ui_contrast", "low")
|
||||
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_italic", "1")
|
||||
vim.api.nvim_set_var("everforest_better_performance", "1")
|
||||
vim.cmd([[colo everforest]])
|
||||
|
||||
-- Settings to override colorscheme
|
||||
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
||||
-- colors of tabline
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3a464c" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
|
||||
-- Settings to override colorscheme
|
||||
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
||||
-- colors of tabline
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3a464c" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
|
||||
|
||||
-- autocommand for overrides
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "everforest",
|
||||
callback = function()
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3c464c" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
|
||||
end,
|
||||
})
|
||||
-- autocommand for overrides
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "everforest",
|
||||
callback = function()
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#3c464c" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, fg = "#dbbc7f" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#dfa000" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#8da101" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
preview_config = {
|
||||
border = 'rounded',
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require('gitsigns').setup({
|
||||
preview_config = {
|
||||
border = 'rounded',
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>gB', function() gs.blame_line { full = true } end)
|
||||
map('n', '<leader>gb', gs.toggle_current_line_blame)
|
||||
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
-- Actions
|
||||
map('n', '<leader>gB', function() gs.blame_line { full = true } end)
|
||||
map('n', '<leader>gb', gs.toggle_current_line_blame)
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
return {
|
||||
{
|
||||
"sainnhe/gruvbox-material",
|
||||
lazy = true,
|
||||
config = function()
|
||||
-- Settings for colorscheme
|
||||
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_ui_contrast", "low")
|
||||
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_italic", "1")
|
||||
vim.api.nvim_set_var("gruvbox_material_better_performance", "1")
|
||||
vim.cmd([[colo gruvbox-material]])
|
||||
{
|
||||
"sainnhe/gruvbox-material",
|
||||
lazy = true,
|
||||
config = function()
|
||||
-- Settings for colorscheme
|
||||
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_ui_contrast", "low")
|
||||
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_italic", "1")
|
||||
vim.api.nvim_set_var("gruvbox_material_better_performance", "1")
|
||||
vim.cmd([[colo gruvbox-material]])
|
||||
|
||||
-- Settings to override colorscheme
|
||||
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
||||
-- colors of tabline
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||
-- Settings to override colorscheme
|
||||
-- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"})
|
||||
-- colors of tabline
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||
|
||||
-- autocommand for overrides
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "gruvbox-material",
|
||||
callback = function()
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||
end,
|
||||
})
|
||||
-- autocommand for overrides
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "gruvbox-material",
|
||||
callback = function()
|
||||
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, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" })
|
||||
-- color of statusline
|
||||
vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" })
|
||||
vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" })
|
||||
-- color of vertical split line
|
||||
vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" })
|
||||
-- color of the cursorline and cursorlinenumber
|
||||
vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" })
|
||||
-- color of Floats and FloatBorders
|
||||
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, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" })
|
||||
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, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -26,10 +26,6 @@ return {
|
|||
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>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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
return {
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
-- event = "BufReadPre",
|
||||
main = 'ibl',
|
||||
config = function()
|
||||
require("ibl").setup({
|
||||
enabled = true,
|
||||
indent = {
|
||||
char = "│",
|
||||
smart_indent_cap = true
|
||||
},
|
||||
whitespace = {
|
||||
remove_blankline_trail = true,
|
||||
},
|
||||
scope = {
|
||||
exclude = {
|
||||
language = { "help", "lazy" }
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
-- event = "BufReadPre",
|
||||
main = 'ibl',
|
||||
config = function()
|
||||
require("ibl").setup({
|
||||
enabled = true,
|
||||
indent = {
|
||||
char = "│",
|
||||
smart_indent_cap = true
|
||||
},
|
||||
whitespace = {
|
||||
remove_blankline_trail = true,
|
||||
},
|
||||
scope = {
|
||||
exclude = {
|
||||
language = { "help", "lazy" }
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -1,161 +1,161 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function()
|
||||
vim.api.nvim_set_option("showmode", false)
|
||||
local custom_gruvbox = require 'lualine.themes.gruvbox-material'
|
||||
custom_gruvbox.normal.a.bg = '#89b482'
|
||||
custom_gruvbox.normal.c.bg = ''
|
||||
custom_gruvbox.insert.a.bg = '#d8a657'
|
||||
custom_gruvbox.visual.a.bg = '#a9b665'
|
||||
custom_gruvbox.replace.a.bg = '#ea6962'
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function()
|
||||
vim.api.nvim_set_option("showmode", false)
|
||||
local custom_gruvbox = require 'lualine.themes.gruvbox-material'
|
||||
custom_gruvbox.normal.a.bg = '#89b482'
|
||||
custom_gruvbox.normal.c.bg = ''
|
||||
custom_gruvbox.insert.a.bg = '#d8a657'
|
||||
custom_gruvbox.visual.a.bg = '#a9b665'
|
||||
custom_gruvbox.replace.a.bg = '#ea6962'
|
||||
|
||||
|
||||
local function lspsaga()
|
||||
return require('lspsaga.symbol.winbar').get_bar()
|
||||
end
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = custom_gruvbox,
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = custom_gruvbox,
|
||||
globalstatus = true,
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = { 'netrw', 'Trouble' },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
icon = '',
|
||||
color = { fg = '#d8a657', bg = '#141617', gui = 'bold' },
|
||||
padding = 1,
|
||||
},
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = { 'netrw', 'Trouble' },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
icon = '',
|
||||
color = { fg = '#d8a657', bg = '#141617', gui = 'bold' },
|
||||
padding = 1,
|
||||
},
|
||||
{
|
||||
'filename',
|
||||
color = { gui = 'italic', fg = '#d3869b', bg = '#1d2021' },
|
||||
padding = 1,
|
||||
path = 1,
|
||||
},
|
||||
},
|
||||
lualine_c = {
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
lspsaga
|
||||
}
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
'filetype',
|
||||
color = { bg = '#1d2021', fg = '#d4be98', gui = 'italic' },
|
||||
padding = 1,
|
||||
fmt = function(str)
|
||||
return (str:gsub("^%l", string.upper))
|
||||
end,
|
||||
},
|
||||
{
|
||||
'fileformat',
|
||||
color = {gui = 'italic', bg = '#141617'},
|
||||
symbols = {
|
||||
unix = '(unix)',
|
||||
dos = '(dos)',
|
||||
mac = '(mac)',
|
||||
},
|
||||
}
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
'filetype',
|
||||
color = { bg = '#1d2021', fg = '#d4be98', gui = 'italic' },
|
||||
padding = 1,
|
||||
fmt = function(str)
|
||||
return (str:gsub("^%l", string.upper))
|
||||
end,
|
||||
},
|
||||
{
|
||||
'fileformat',
|
||||
color = { gui = 'italic', bg = '#141617' },
|
||||
symbols = {
|
||||
unix = '(unix)',
|
||||
dos = '(dos)',
|
||||
mac = '(mac)',
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'diagnostics',
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||
padding = 1,
|
||||
update_in_insert = true
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
icon = { ' ', color = { bg = '#141617', fg = '#d8a657', gui = 'bold' } },
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'location',
|
||||
padding = 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'diagnostics',
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||
padding = 1,
|
||||
update_in_insert = true
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
icon = { ' ', color = { bg = '#141617', fg = '#d8a657', gui = 'bold' } },
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'location',
|
||||
padding = 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
inactive_sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
icon = '',
|
||||
padding = 1,
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
icon = '',
|
||||
padding = 1,
|
||||
},
|
||||
{
|
||||
'filename',
|
||||
padding = 1,
|
||||
path = 1,
|
||||
}
|
||||
},
|
||||
lualine_c = {
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
'filetype',
|
||||
color = { gui = 'italic' },
|
||||
padding = 1,
|
||||
fmt = function(str)
|
||||
return (str:gsub("^%l", string.upper))
|
||||
end,
|
||||
},
|
||||
{
|
||||
'fileformat',
|
||||
color = {gui = 'italic'},
|
||||
symbols = {
|
||||
unix = 'Unix',
|
||||
dos = 'Dos',
|
||||
mac = 'Mac',
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'diagnostics',
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||
padding = 1,
|
||||
update_in_insert = true
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
icon = { ' ', color = { bg = '#141617', gui = 'bold' } },
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'location',
|
||||
padding = 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
lualine_c = {
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
'filetype',
|
||||
color = { gui = 'italic' },
|
||||
padding = 1,
|
||||
fmt = function(str)
|
||||
return (str:gsub("^%l", string.upper))
|
||||
end,
|
||||
},
|
||||
{
|
||||
'fileformat',
|
||||
color = { gui = 'italic' },
|
||||
symbols = {
|
||||
unix = 'Unix',
|
||||
dos = 'Dos',
|
||||
mac = 'Mac',
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{
|
||||
'diagnostics',
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
symbols = { error = "✘ ", warn = " ", info = " ", hint = " " },
|
||||
padding = 1,
|
||||
update_in_insert = true
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
icon = { ' ', color = { bg = '#141617', gui = 'bold' } },
|
||||
color = { gui = 'bold', bg = '#141617' },
|
||||
padding = 1,
|
||||
}
|
||||
},
|
||||
lualine_z = {
|
||||
{
|
||||
'location',
|
||||
padding = 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ return {
|
|||
opts = {},
|
||||
config = function()
|
||||
require 'marks'.setup({
|
||||
sign_priority = 5;
|
||||
sign_priority = 5,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"nvim-lua/plenary.nvim",
|
||||
lazy = true,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = "VeryLazy",
|
||||
config = function ()
|
||||
require('treesitter-context').setup{
|
||||
enable = true,
|
||||
max_lines = 0,
|
||||
min_window_height = 0,
|
||||
line_numbers = true,
|
||||
}
|
||||
end
|
||||
}
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require('treesitter-context').setup {
|
||||
enable = true,
|
||||
max_lines = 0,
|
||||
min_window_height = 0,
|
||||
line_numbers = true,
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ return {
|
|||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
['@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
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false,
|
||||
build = ":TSUpdate",
|
||||
-- event = "BufReadPre",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"latex",
|
||||
"bibtex",
|
||||
"python",
|
||||
"vim",
|
||||
"yaml",
|
||||
"json",
|
||||
},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {
|
||||
"markdown",
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false,
|
||||
build = ":TSUpdate",
|
||||
-- event = "BufReadPre",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"lua",
|
||||
"rust",
|
||||
"latex",
|
||||
"bibtex",
|
||||
"python",
|
||||
"vim",
|
||||
"yaml",
|
||||
"json",
|
||||
},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {
|
||||
"markdown",
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
}
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,14 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"mbbill/undotree",
|
||||
keys = {
|
||||
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "toggle undotree" },
|
||||
},
|
||||
config = function()
|
||||
vim.g.undotree_WindowLayout = 4
|
||||
vim.g.undotree_SplitWidth = 40
|
||||
vim.g.undotree_SetFocusWhenToggle = 1
|
||||
end
|
||||
}
|
||||
{
|
||||
"mbbill/undotree",
|
||||
keys = {
|
||||
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "toggle undotree" },
|
||||
},
|
||||
config = function()
|
||||
vim.g.undotree_WindowLayout = 4
|
||||
vim.g.undotree_SplitWidth = 40
|
||||
vim.g.undotree_SetFocusWhenToggle = 1
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ return {
|
|||
opts = {
|
||||
window = {
|
||||
backdrop = 1,
|
||||
width = 101,
|
||||
width = 120,
|
||||
},
|
||||
plugins = {
|
||||
options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue