chore(nvim): a lot
format, fix nvim-tree startup, update telescope, drop unused plugins
This commit is contained in:
@@ -6,4 +6,3 @@ require("langs.langs-setup")
|
|||||||
require("plugins.plugins-setup")
|
require("plugins.plugins-setup")
|
||||||
|
|
||||||
require("core.autostart")
|
require("core.autostart")
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ function G.switch_input_method(req)
|
|||||||
return input_status
|
return input_status
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function G.buf_kill(kill_command, bufnr, force)
|
function G.buf_kill(kill_command, bufnr, force)
|
||||||
kill_command = kill_command or "bd"
|
kill_command = kill_command or "bd"
|
||||||
|
|
||||||
@@ -61,7 +60,8 @@ function G.buf_kill(kill_command, bufnr, force)
|
|||||||
end)
|
end)
|
||||||
elseif choice == 2 then
|
elseif choice == 2 then
|
||||||
force = true
|
force = true
|
||||||
else return
|
else
|
||||||
|
return
|
||||||
end
|
end
|
||||||
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
||||||
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
|
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ keymap.set("n", "<leader>ww", ":w<CR>", opt)
|
|||||||
keymap.set("n", "<leader>so", ":so<CR>", opt)
|
keymap.set("n", "<leader>so", ":so<CR>", opt)
|
||||||
keymap.set("n", "<leader>qq", ":q<CR>", opt)
|
keymap.set("n", "<leader>qq", ":q<CR>", opt)
|
||||||
keymap.set("n", "<leader>qa", ":qa<CR>", opt)
|
keymap.set("n", "<leader>qa", ":qa<CR>", opt)
|
||||||
keymap.set("n", "<leader>c", function () buf_kill("bd", nil, false) end, opt)
|
keymap.set("n", "<leader>c", function()
|
||||||
|
buf_kill("bd", nil, false)
|
||||||
|
end, opt)
|
||||||
|
|
||||||
keymap.set("n", "<C-up>", ":resize +5<CR>", opt)
|
keymap.set("n", "<C-up>", ":resize +5<CR>", opt)
|
||||||
keymap.set("n", "<C-down>", ":resize -5<CR>", opt)
|
keymap.set("n", "<C-down>", ":resize -5<CR>", opt)
|
||||||
@@ -63,9 +65,8 @@ keymap.set("n", "<leader>wr", ":WorkspacesRemove<CR>", opt)
|
|||||||
|
|
||||||
-- Neovide config
|
-- Neovide config
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
keymap.set("v", "<C-C>", "\"+y", opt)
|
keymap.set("v", "<C-C>", '"+y', opt)
|
||||||
keymap.set("n", "<C-V>", "\"+P", opt)
|
keymap.set("n", "<C-V>", '"+P', opt)
|
||||||
keymap.set("i", "<C-V>", "<ESC>l\"+Pli", opt)
|
keymap.set("i", "<C-V>", '<ESC>l"+Pli', opt)
|
||||||
keymap.set("c", "<C-V>", "<C-R>+", opt)
|
keymap.set("c", "<C-V>", "<C-R>+", opt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ vim.g.autoread = true
|
|||||||
vim.g.loaded_ruby_provider = 0
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
-- Hightlight on yank
|
-- Hightlight on yank
|
||||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.highlight.on_yank()
|
||||||
end,
|
end,
|
||||||
@@ -62,7 +62,7 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
|||||||
callback = function()
|
callback = function()
|
||||||
Last_input_method = require("core.globals").switch_input_method(1)
|
Last_input_method = require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
group = "AutoInputMethod"
|
group = "AutoInputMethod",
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
@@ -70,7 +70,7 @@ vim.api.nvim_create_autocmd("CmdlineLeave", {
|
|||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(1)
|
require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
group = "AutoInputMethod"
|
group = "AutoInputMethod",
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
@@ -78,7 +78,7 @@ vim.api.nvim_create_autocmd("InsertEnter", {
|
|||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(Last_input_method)
|
require("core.globals").switch_input_method(Last_input_method)
|
||||||
end,
|
end,
|
||||||
group = "AutoInputMethod"
|
group = "AutoInputMethod",
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
@@ -89,8 +89,8 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||||||
-- credit: https://github.com/sam4llis/nvim-lua-gf
|
-- credit: https://github.com/sam4llis/nvim-lua-gf
|
||||||
vim.opt_local.include = [[\v<((do|load)file|require|reload)[^''"]*[''"]\zs[^''"]+]]
|
vim.opt_local.include = [[\v<((do|load)file|require|reload)[^''"]*[''"]\zs[^''"]+]]
|
||||||
vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')"
|
vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')"
|
||||||
vim.opt_local.suffixesadd:prepend ".lua"
|
vim.opt_local.suffixesadd:prepend(".lua")
|
||||||
vim.opt_local.suffixesadd:prepend "init.lua"
|
vim.opt_local.suffixesadd:prepend("init.lua")
|
||||||
|
|
||||||
for _, path in pairs(vim.api.nvim_list_runtime_paths()) do
|
for _, path in pairs(vim.api.nvim_list_runtime_paths()) do
|
||||||
vim.opt_local.path:append(path .. "/lua")
|
vim.opt_local.path:append(path .. "/lua")
|
||||||
|
|||||||
@@ -10,4 +10,3 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
|||||||
end,
|
end,
|
||||||
group = "Go",
|
group = "Go",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,3 @@ vim.api.nvim_create_autocmd("BufLeave", {
|
|||||||
end,
|
end,
|
||||||
group = "Lua",
|
group = "Lua",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,3 @@ vim.api.nvim_create_autocmd("BufLeave", {
|
|||||||
end,
|
end,
|
||||||
group = "Markdown",
|
group = "Markdown",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,3 @@ vim.api.nvim_create_autocmd("BufLeave", {
|
|||||||
end,
|
end,
|
||||||
group = "Nix",
|
group = "Nix",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
|||||||
end,
|
end,
|
||||||
group = "Rust",
|
group = "Rust",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ M = {
|
|||||||
javascript = { "string", "template_string" },
|
javascript = { "string", "template_string" },
|
||||||
},
|
},
|
||||||
fast_wrap = {
|
fast_wrap = {
|
||||||
map = '<M-e>',
|
map = "<M-e>",
|
||||||
chars = { '{', '[', '(', '"', "'" },
|
chars = { "{", "[", "(", '"', "'" },
|
||||||
pattern = [=[[%'%"%)%>%]%)%}%,]]=],
|
pattern = [=[[%'%"%)%>%]%)%}%,]]=],
|
||||||
end_key = '$',
|
end_key = "$",
|
||||||
keys = 'qwertyuiopzxcvbnmasdfghjkl',
|
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||||
check_comma = true,
|
check_comma = true,
|
||||||
highlight = 'Search',
|
highlight = "Search",
|
||||||
highlight_grey='Comment'
|
highlight_grey = "Comment",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,4 +23,3 @@ if ok then
|
|||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ local buf_kill = require("core.globals").buf_kill
|
|||||||
M = {
|
M = {
|
||||||
highlights = {
|
highlights = {
|
||||||
buffer_selected = {
|
buffer_selected = {
|
||||||
bold = true
|
bold = true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
@@ -13,7 +13,7 @@ M = {
|
|||||||
filetype = "NvimTree",
|
filetype = "NvimTree",
|
||||||
text = "File Explorer",
|
text = "File Explorer",
|
||||||
highlight = "Directory",
|
highlight = "Directory",
|
||||||
text_align = "center"
|
text_align = "center",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
close_command = function(bufnr)
|
close_command = function(bufnr)
|
||||||
@@ -21,11 +21,10 @@ M = {
|
|||||||
end,
|
end,
|
||||||
right_mouse_command = function(bufnr)
|
right_mouse_command = function(bufnr)
|
||||||
buf_kill("bd", bufnr, true)
|
buf_kill("bd", bufnr, true)
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@ local cmp = require("cmp")
|
|||||||
M = {
|
M = {
|
||||||
window = {
|
window = {
|
||||||
completion = {
|
completion = {
|
||||||
border = 'rounded',
|
border = "rounded",
|
||||||
scrollbar = '║',
|
scrollbar = "║",
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
border = 'rounded',
|
border = "rounded",
|
||||||
scrollbar = '║',
|
scrollbar = "║",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = require('lspkind').cmp_format({
|
format = require("lspkind").cmp_format({
|
||||||
mode = "symbol",
|
mode = "symbol",
|
||||||
maxwidth = 50,
|
maxwidth = 50,
|
||||||
ellipsis_char = '...',
|
ellipsis_char = "...",
|
||||||
symbol_map = { Codeium = "", }
|
symbol_map = { Codeium = "" },
|
||||||
})
|
}),
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@@ -37,7 +37,7 @@ M = {
|
|||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s"
|
"s",
|
||||||
}),
|
}),
|
||||||
["<Down>"] = cmp.mapping(function(fallback)
|
["<Down>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
@@ -47,7 +47,7 @@ M = {
|
|||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s"
|
"s",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
@@ -57,12 +57,10 @@ M = {
|
|||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
})
|
}),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.o.wildmenu = true
|
vim.o.wildmenu = true
|
||||||
vim.o.pumheight = 10
|
vim.o.pumheight = 10
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +1,30 @@
|
|||||||
M = {
|
M = {
|
||||||
sources = {
|
sources = {
|
||||||
friendly_snippets = true
|
friendly_snippets = true,
|
||||||
},
|
},
|
||||||
history = true,
|
history = true,
|
||||||
updateevents = { "TextChanged", "TextChangedI" }
|
updateevents = { "TextChanged", "TextChangedI" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- vscode format
|
-- vscode format
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
|
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.vscode_snippets_path or "" })
|
||||||
|
|
||||||
-- snipmate format
|
-- snipmate format
|
||||||
require("luasnip.loaders.from_snipmate").load()
|
require("luasnip.loaders.from_snipmate").load()
|
||||||
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
|
require("luasnip.loaders.from_snipmate").lazy_load({ paths = vim.g.snipmate_snippets_path or "" })
|
||||||
|
|
||||||
-- lua format
|
-- lua format
|
||||||
require("luasnip.loaders.from_lua").load()
|
require("luasnip.loaders.from_lua").load()
|
||||||
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
|
require("luasnip.loaders.from_lua").lazy_load({ paths = vim.g.lua_snippets_path or "" })
|
||||||
|
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
callback = function()
|
callback = function()
|
||||||
if
|
if luasnip.session.current_nodes[vim.api.nvim_get_current_buf()] and not luasnip.session.jump_active then
|
||||||
luasnip.session.current_nodes[vim.api.nvim_get_current_buf()]
|
|
||||||
and not luasnip.session.jump_active
|
|
||||||
then
|
|
||||||
luasnip.unlink_current()
|
luasnip.unlink_current()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
M = {}
|
M = {}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
M = {
|
M = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '▎', color = "green" },
|
add = { text = "▎", color = "green" },
|
||||||
change = { text = '▎', color = "blue" },
|
change = { text = "▎", color = "blue" },
|
||||||
delete = { text = '_' },
|
delete = { text = "_" },
|
||||||
topdelete = { text = '‾' },
|
topdelete = { text = "‾" },
|
||||||
changedelete = { text = '~' },
|
changedelete = { text = "~" },
|
||||||
},
|
},
|
||||||
current_line_blame = true,
|
current_line_blame = true,
|
||||||
current_line_blame_opts = {
|
current_line_blame_opts = {
|
||||||
virt_text = true,
|
virt_text = true,
|
||||||
virt_text_pos = 'eol',
|
virt_text_pos = "eol",
|
||||||
delay = 0,
|
delay = 0,
|
||||||
ignore_whitespace = false,
|
ignore_whitespace = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
M = {
|
M = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
indent = {
|
indent = {
|
||||||
tab_char = "▎"
|
tab_char = "▎",
|
||||||
},
|
},
|
||||||
scope = {
|
scope = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
show_start = false,
|
show_start = false,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
M = {}
|
M = {}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -20,24 +20,24 @@ local extra_config = {
|
|||||||
vim.api.nvim_get_runtime_file("", true),
|
vim.api.nvim_get_runtime_file("", true),
|
||||||
"${3rd}/luv/library",
|
"${3rd}/luv/library",
|
||||||
"${3rd}/luassert/library",
|
"${3rd}/luassert/library",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
globals = {
|
globals = {
|
||||||
"vim"
|
"vim",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
callSnippet = "Replace"
|
callSnippet = "Replace",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
settings = {
|
settings = {
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
check = {
|
check = {
|
||||||
command = "clippy"
|
command = "clippy",
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
experimental = true,
|
experimental = true,
|
||||||
@@ -45,7 +45,7 @@ local extra_config = {
|
|||||||
formatting = {
|
formatting = {
|
||||||
command = { "rustfmt" },
|
command = { "rustfmt" },
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nixd = {
|
nixd = {
|
||||||
@@ -59,9 +59,9 @@ local extra_config = {
|
|||||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.imxyy-nix.options',
|
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.imxyy-nix.options',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
@@ -74,7 +74,7 @@ local lspconfig = require("lspconfig")
|
|||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
local extra = extra_config[server] or {}
|
local extra = extra_config[server] or {}
|
||||||
local config = {
|
local config = {
|
||||||
capabilities = capabilities
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
for k, v in pairs(extra) do
|
for k, v in pairs(extra) do
|
||||||
config[k] = v
|
config[k] = v
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
M = {
|
M = {
|
||||||
-- ensure_installed = require("plugins.lsp.servers")
|
-- ensure_installed = require("plugins.lsp.servers")
|
||||||
ensure_installed = {}
|
ensure_installed = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,9 @@ M = {
|
|||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = "✓",
|
||||||
package_pending = "➜",
|
package_pending = "➜",
|
||||||
package_uninstalled = "✗"
|
package_uninstalled = "✗",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local signs = {
|
|||||||
[sev.ERROR] = " ",
|
[sev.ERROR] = " ",
|
||||||
[sev.WARN] = " ",
|
[sev.WARN] = " ",
|
||||||
[sev.HINT] = " ",
|
[sev.HINT] = " ",
|
||||||
[sev.INFO] = " "
|
[sev.INFO] = " ",
|
||||||
}
|
}
|
||||||
for type, icon in pairs(icons) do
|
for type, icon in pairs(icons) do
|
||||||
local hl = vim.diagnostic.severity[type]
|
local hl = vim.diagnostic.severity[type]
|
||||||
@@ -18,7 +18,7 @@ for type, icon in pairs(icons) do
|
|||||||
end
|
end
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
signs = {
|
signs = {
|
||||||
text = signs
|
text = signs,
|
||||||
},
|
},
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
@@ -35,7 +35,7 @@ local diag_config1 = {
|
|||||||
max = vim.diagnostic.severity.WARN,
|
max = vim.diagnostic.severity.WARN,
|
||||||
},
|
},
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
prefix = "●"
|
prefix = "●",
|
||||||
},
|
},
|
||||||
virtual_lines = {
|
virtual_lines = {
|
||||||
severity = {
|
severity = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
M = {
|
M = {
|
||||||
symbols = {
|
symbols = {
|
||||||
icon_source = "lspkind"
|
icon_source = "lspkind",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>o", "<cmd>Outline<CR>", { desc = "Toggle Outline" })
|
vim.keymap.set("n", "<leader>o", "<cmd>Outline<CR>", { desc = "Toggle Outline" })
|
||||||
|
|||||||
@@ -12,4 +12,3 @@ M = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
M = {
|
M = {
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||||
handler_opts = {
|
handler_opts = {
|
||||||
border = "rounded"
|
border = "rounded",
|
||||||
},
|
},
|
||||||
hint_prefix = "^ ",
|
hint_prefix = "^ ",
|
||||||
toggle_key = "<C-k>",
|
toggle_key = "<C-k>",
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.keymap.set({ 'n' }, '<leader>k', require('lsp_signature').toggle_float_win,
|
vim.keymap.set(
|
||||||
{ silent = true, noremap = true, desc = 'toggle signature' })
|
{ "n" },
|
||||||
|
"<leader>k",
|
||||||
|
require("lsp_signature").toggle_float_win,
|
||||||
|
{ silent = true, noremap = true, desc = "toggle signature" }
|
||||||
|
)
|
||||||
|
|
||||||
vim.keymap.set({ 'n' }, 'K', vim.lsp.buf.signature_help,
|
vim.keymap.set({ "n" }, "K", vim.lsp.buf.signature_help, { silent = true, noremap = true, desc = "toggle signature" })
|
||||||
{ silent = true, noremap = true, desc = 'toggle signature' })
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
M = {
|
M = {
|
||||||
options = {
|
options = {
|
||||||
theme = "tokyonight"
|
theme = "tokyonight",
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
'encoding', 'fileformat', 'filetype',
|
"encoding",
|
||||||
|
"fileformat",
|
||||||
|
"filetype",
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
M = {}
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("MarkdownPreviewAuto", {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("MarkdownPreviewAutoEnable", function()
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
|
||||||
group = "MarkdownPreviewAuto",
|
|
||||||
pattern = { "*.md" },
|
|
||||||
desc = "Auto enable MarkdownPreview",
|
|
||||||
callback = function()
|
|
||||||
vim.cmd("MarkdownPreview")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("BufLeave", {
|
|
||||||
group = "MarkdownPreviewAuto",
|
|
||||||
pattern = { "*.md" },
|
|
||||||
desc = "Auto disable MarkdownPreview",
|
|
||||||
callback = function()
|
|
||||||
vim.cmd("MarkdownPreviewStop")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end, { desc = "Auto enable MarkdownPreview" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("MarkdownPreviewAutoDisable",
|
|
||||||
function()
|
|
||||||
vim.api.nvim_clear_autocmds({ group = "MarkdownPreviewAuto" })
|
|
||||||
end, {}
|
|
||||||
)
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
M = {}
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@ M = {
|
|||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = false,
|
enable = false,
|
||||||
debounce_delay = 50,
|
debounce_delay = 50,
|
||||||
show_on_dirs = true
|
show_on_dirs = true,
|
||||||
},
|
},
|
||||||
filters = {
|
filters = {
|
||||||
git_ignored = false
|
git_ignored = false,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
@@ -18,4 +18,3 @@ vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", opt)
|
|||||||
vim.keymap.set("n", "<leader>te", ":NvimTreeFocus<CR>", opt)
|
vim.keymap.set("n", "<leader>te", ":NvimTreeFocus<CR>", opt)
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ if not vim.loop.fs_stat(lazypath) then
|
|||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
lazypath
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
@@ -18,7 +18,7 @@ local plugins = {
|
|||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme("tokyonight-storm")
|
vim.cmd.colorscheme("tokyonight-storm")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
@@ -26,41 +26,41 @@ local plugins = {
|
|||||||
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup(require("plugins.lualine"))
|
require("lualine").setup(require("plugins.lualine"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
||||||
event = "VeryLazy",
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-tree").setup(require("plugins.nvim-tree"))
|
require("nvim-tree").setup(require("plugins.nvim-tree"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = "VeryLazy",
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
"nushell/tree-sitter-nu"
|
"nushell/tree-sitter-nu",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup(require("plugins.treesitter"))
|
require("nvim-treesitter.configs").setup(require("plugins.treesitter"))
|
||||||
end,
|
end,
|
||||||
build = ":TSUpdate"
|
build = ":TSUpdate",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
|
url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.rainbow-delimiters")
|
require("plugins.rainbow-delimiters")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("ibl").setup(require("plugins.indent-blankline"))
|
require("ibl").setup(require("plugins.indent-blankline"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
@@ -69,7 +69,7 @@ local plugins = {
|
|||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.lspconfig")
|
require("plugins.lsp.lspconfig")
|
||||||
require("plugins.lsp.others")
|
require("plugins.lsp.others")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
@@ -107,7 +107,7 @@ local plugins = {
|
|||||||
desc = "Quickfix List (Trouble)",
|
desc = "Quickfix List (Trouble)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {}
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"MysticalDevil/inlay-hints.nvim",
|
"MysticalDevil/inlay-hints.nvim",
|
||||||
@@ -115,7 +115,7 @@ local plugins = {
|
|||||||
dependencies = { "neovim/nvim-lspconfig" },
|
dependencies = { "neovim/nvim-lspconfig" },
|
||||||
config = function()
|
config = function()
|
||||||
require("inlay-hints").setup()
|
require("inlay-hints").setup()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hedyhli/outline.nvim",
|
"hedyhli/outline.nvim",
|
||||||
@@ -131,7 +131,7 @@ local plugins = {
|
|||||||
build = "make install_jsregexp",
|
build = "make install_jsregexp",
|
||||||
config = function()
|
config = function()
|
||||||
require("luasnip").setup(require("plugins.cmp.luasnip"))
|
require("luasnip").setup(require("plugins.cmp.luasnip"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
@@ -141,19 +141,19 @@ local plugins = {
|
|||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"onsails/lspkind.nvim"
|
"onsails/lspkind.nvim",
|
||||||
},
|
},
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("cmp").setup(require("plugins.cmp.cmp"))
|
require("cmp").setup(require("plugins.cmp.cmp"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("Comment").setup(require("plugins.comment"))
|
require("Comment").setup(require("plugins.comment"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
@@ -161,20 +161,20 @@ local plugins = {
|
|||||||
dependencies = { "hrsh7th/nvim-cmp" },
|
dependencies = { "hrsh7th/nvim-cmp" },
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup(require("plugins.autopairs"))
|
require("nvim-autopairs").setup(require("plugins.autopairs"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("bufferline").setup(require("plugins.bufferline"))
|
require("bufferline").setup(require("plugins.bufferline"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup(require("plugins.gitsigns"))
|
require("gitsigns").setup(require("plugins.gitsigns"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
@@ -182,46 +182,18 @@ local plugins = {
|
|||||||
dependencies = { "nvim-lua/plenary.nvim", "BurntSushi/ripgrep" },
|
dependencies = { "nvim-lua/plenary.nvim", "BurntSushi/ripgrep" },
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").setup(require("plugins.telescope"))
|
require("telescope").setup(require("plugins.telescope"))
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alexghergh/nvim-tmux-navigation",
|
"alexghergh/nvim-tmux-navigation",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-tmux-navigation").setup(require("plugins.tmuxnav"))
|
require("nvim-tmux-navigation").setup(require("plugins.tmuxnav"))
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"natecraddock/workspaces.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = { "nvim-telescope/telescope.nvim", "natecraddock/sessions.nvim" },
|
|
||||||
config = function()
|
|
||||||
require("workspaces").setup(require("plugins.workspaces"))
|
|
||||||
require("telescope").load_extension("workspaces")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
--[[ {
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop", "MarkdownPreviewAutoEnable", "MarkdownPreviewAutoDisable" },
|
|
||||||
ft = { "markdown" },
|
|
||||||
build = function()
|
|
||||||
vim.fn["mkdp#util#install"]()
|
|
||||||
end,
|
end,
|
||||||
config = function()
|
},
|
||||||
require("plugins.markdown-preview")
|
|
||||||
end
|
|
||||||
}, ]]
|
|
||||||
--[[ {
|
|
||||||
"dhruvasagar/vim-table-mode",
|
|
||||||
lazy = true,
|
|
||||||
event = "BufEnter *.md",
|
|
||||||
config = function()
|
|
||||||
require("plugins.table-mode")
|
|
||||||
end
|
|
||||||
}, ]]
|
|
||||||
{
|
{
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" },
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -236,15 +208,15 @@ local plugins = {
|
|||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
["cmp.entry.get_documentation"] = true,
|
["cmp.entry.get_documentation"] = true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"voldikss/vim-floaterm",
|
"voldikss/vim-floaterm",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.floaterm")
|
require("plugins.floaterm")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
@@ -256,7 +228,7 @@ local plugins = {
|
|||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("osc52").setup({
|
require("osc52").setup({
|
||||||
tmux_passthrough = true
|
tmux_passthrough = true,
|
||||||
})
|
})
|
||||||
local function copy()
|
local function copy()
|
||||||
if vim.v.event.operator == "y" and vim.v.event.regname == "+" then
|
if vim.v.event.operator == "y" and vim.v.event.regname == "+" then
|
||||||
@@ -264,19 +236,13 @@ local plugins = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pest-parser/pest.vim",
|
"pest-parser/pest.vim",
|
||||||
ft = "pest",
|
ft = "pest",
|
||||||
opts = {}
|
opts = {},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local opts = {
|
require("lazy").setup(plugins, {})
|
||||||
rocks = {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lazy").setup(plugins, opts)
|
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
local rainbow_delimiters = require("rainbow-delimiters")
|
local rainbow_delimiters = require("rainbow-delimiters")
|
||||||
vim.g.rainbow_delimiters = {
|
vim.g.rainbow_delimiters = {
|
||||||
strategy = {
|
strategy = {
|
||||||
[''] = rainbow_delimiters.strategy['global'],
|
[""] = rainbow_delimiters.strategy["global"],
|
||||||
vim = rainbow_delimiters.strategy['local'],
|
vim = rainbow_delimiters.strategy["local"],
|
||||||
},
|
},
|
||||||
query = {
|
query = {
|
||||||
[''] = 'rainbow-delimiters',
|
[""] = "rainbow-delimiters",
|
||||||
lua = 'rainbow-blocks',
|
lua = "rainbow-blocks",
|
||||||
},
|
},
|
||||||
highlight = {
|
highlight = {
|
||||||
'RainbowDelimiterRed',
|
"RainbowDelimiterRed",
|
||||||
'RainbowDelimiterYellow',
|
"RainbowDelimiterYellow",
|
||||||
'RainbowDelimiterBlue',
|
"RainbowDelimiterBlue",
|
||||||
'RainbowDelimiterOrange',
|
"RainbowDelimiterOrange",
|
||||||
'RainbowDelimiterGreen',
|
"RainbowDelimiterGreen",
|
||||||
'RainbowDelimiterViolet',
|
"RainbowDelimiterViolet",
|
||||||
'RainbowDelimiterCyan',
|
"RainbowDelimiterCyan",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
M = {}
|
|
||||||
|
|
||||||
vim.g.table_mode_corner = "|"
|
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("TableModeAuto", {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("TableModeAutoEnable", function()
|
|
||||||
vim.api.nvim_clear_autocmds({ group = "TableModeAuto" })
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
|
||||||
group = "TableModeAuto",
|
|
||||||
pattern = { "*.md" },
|
|
||||||
desc = "Auto enable TableMode",
|
|
||||||
callback = function()
|
|
||||||
vim.cmd("TableModeEnable")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("BufWrite", {
|
|
||||||
group = "TableModeAuto",
|
|
||||||
pattern = { "*.md" },
|
|
||||||
desc = "Auto enable TableMode",
|
|
||||||
callback = function()
|
|
||||||
vim.cmd("TableModeRealign")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end, { desc = "Auto enable TableMode" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("TableModeAutoDisable",
|
|
||||||
function()
|
|
||||||
vim.api.nvim_clear_autocmds({ group = "TableModeAuto" })
|
|
||||||
end, {}
|
|
||||||
)
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
||||||
@@ -3,8 +3,8 @@ M = {
|
|||||||
winblend = 50,
|
winblend = 50,
|
||||||
path_display = {
|
path_display = {
|
||||||
"smart",
|
"smart",
|
||||||
shorten = 3
|
shorten = 3,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
lsp_definitions = {
|
lsp_definitions = {
|
||||||
@@ -17,29 +17,28 @@ M = {
|
|||||||
},
|
},
|
||||||
current_buffer_fuzzy_find = {
|
current_buffer_fuzzy_find = {
|
||||||
theme = "dropdown",
|
theme = "dropdown",
|
||||||
layout_config = { height = 0.7, width = 0.55, preview_cutoff = 0 ,prompt_position = "top" }
|
layout_config = { height = 0.7, width = 0.55, preview_cutoff = 0, prompt_position = "top" },
|
||||||
},
|
},
|
||||||
lsp_document_symbols = {
|
lsp_document_symbols = {
|
||||||
theme = "ivy",
|
theme = "ivy",
|
||||||
layout_config = { height = 0.25 }
|
layout_config = { height = 0.25 },
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local opt = require("core.globals").keymap_opt
|
local opt = require("core.globals").keymap_opt
|
||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
keymap.set('n', '<leader>ff', builtin.find_files, opt)
|
keymap.set("n", "<leader>ff", builtin.find_files, opt)
|
||||||
keymap.set('n', '<leader>gf', builtin.git_files, opt)
|
keymap.set("n", "<leader>gf", builtin.git_files, opt)
|
||||||
keymap.set('n', '<leader>fg', builtin.live_grep, opt)
|
keymap.set("n", "<leader>fg", builtin.live_grep, opt)
|
||||||
keymap.set('n', '<leader>fb', builtin.buffers, opt)
|
keymap.set("n", "<leader>fb", builtin.buffers, opt)
|
||||||
keymap.set('n', '<leader>fh', builtin.help_tags, opt)
|
keymap.set("n", "<leader>fh", builtin.help_tags, opt)
|
||||||
-- keymap.set('n', '<leader>lD', builtin.diagnostics, opt)
|
-- keymap.set('n', '<leader>lD', builtin.diagnostics, opt)
|
||||||
keymap.set('n', '<leader>ld', builtin.lsp_definitions, opt)
|
keymap.set("n", "<leader>ld", builtin.lsp_definitions, opt)
|
||||||
keymap.set('n', '<leader>lr', builtin.lsp_references, opt)
|
keymap.set("n", "<leader>lr", builtin.lsp_references, opt)
|
||||||
keymap.set('n', '<leader>ls', builtin.lsp_document_symbols, opt)
|
keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, opt)
|
||||||
keymap.set('n', '<leader>/', builtin.current_buffer_fuzzy_find, opt)
|
keymap.set("n", "<leader>/", builtin.current_buffer_fuzzy_find, opt)
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -11,4 +11,3 @@ keymap.set("n", "<C-\\>", tmuxnav.NvimTmuxNavigateLastActive)
|
|||||||
keymap.set("n", "<C-Space>", tmuxnav.NvimTmuxNavigateNext)
|
keymap.set("n", "<C-Space>", tmuxnav.NvimTmuxNavigateNext)
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,14 @@ M = {
|
|||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true }
|
indent = { enable = true },
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*/hypr/.*%.conf"] = "hyprlang",
|
[".*/hypr/.*%.conf"] = "hyprlang",
|
||||||
[".*%.hl"] = "hyprlang"
|
[".*%.hl"] = "hyprlang",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
M = {
|
|
||||||
hooks = {
|
|
||||||
open = function ()
|
|
||||||
require("core.globals").close_empty_buffer()
|
|
||||||
vim.cmd("enew")
|
|
||||||
vim.cmd("bufdo bd")
|
|
||||||
require("sessions").load(nil, { silent = true })
|
|
||||||
vim.cmd("NvimTreeFocus")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user