Improve LSP configs and change keybindings to align with default nvim
0.11 ones
This commit is contained in:
parent
f9f53656f7
commit
0eea4c8dab
33 changed files with 656 additions and 553 deletions
|
|
@ -8,5 +8,5 @@ trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.lua]
|
[*.lua]
|
||||||
max_line_length = 120
|
max_line_length = 80
|
||||||
align_array_table = false
|
align_array_table = false
|
||||||
|
|
|
||||||
|
|
@ -6,23 +6,28 @@
|
||||||
"fzf-lua": { "branch": "main", "commit": "ac6a34ea39831ec71c14f72075facf377ea9a00d" },
|
"fzf-lua": { "branch": "main", "commit": "ac6a34ea39831ec71c14f72075facf377ea9a00d" },
|
||||||
"glance.nvim": { "branch": "master", "commit": "cb19b86349cbe634eec0ea768b9a27fdd6d24f34" },
|
"glance.nvim": { "branch": "master", "commit": "cb19b86349cbe634eec0ea768b9a27fdd6d24f34" },
|
||||||
"hurl.nvim": { "branch": "main", "commit": "bf00b4ee56dc8026dd7cd068236fb2c01bb1e307" },
|
"hurl.nvim": { "branch": "main", "commit": "bf00b4ee56dc8026dd7cd068236fb2c01bb1e307" },
|
||||||
|
"key-analyzer.nvim": { "branch": "main", "commit": "72d301fb8843c19d8e69e16e0a0b42256edc25cc" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
|
||||||
"lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" },
|
"lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
"mini.files": { "branch": "main", "commit": "01001e0cfc1e79f581d055ae3f70fbac96a2f378" },
|
"mini.files": { "branch": "main", "commit": "01001e0cfc1e79f581d055ae3f70fbac96a2f378" },
|
||||||
"mini.statusline": { "branch": "main", "commit": "1b0edf76fe2af015f8c989385ff949f1db7aade2" },
|
"mini.statusline": { "branch": "main", "commit": "1b0edf76fe2af015f8c989385ff949f1db7aade2" },
|
||||||
"namu.nvim": { "branch": "main", "commit": "fc9632d7deb81c737577ecfa5879aa3bd1fc0433" },
|
"namu.nvim": { "branch": "main", "commit": "fc9632d7deb81c737577ecfa5879aa3bd1fc0433" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" },
|
||||||
|
"none-ls-extras.nvim": { "branch": "main", "commit": "1214d729e3408470a7b7a428415a395e5389c13c" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" },
|
"nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "85168f15808d89b0222313652b9d2777eda3cb08" },
|
"nvim-treesitter": { "branch": "master", "commit": "da5825bf70cc2ea7eacd1e60c32c07baf19adeba" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||||
|
"output-panel.nvim": { "branch": "main", "commit": "9979f9988acb35fd8e699d8b1fbc7aa17c9d8148" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "84d413b0c432adaeaf3dcaac646638bd99d06aa6" },
|
"render-markdown.nvim": { "branch": "main", "commit": "c91fa46fc8d79f5577beac70a459f30ec17a60c2" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||||
|
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,37 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "vscode-eslint-language-server", "--stdio" },
|
cmd = { "vscode-eslint-language-server", "--stdio" },
|
||||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" }
|
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" },
|
||||||
|
root_markers = { ".git" },
|
||||||
|
settings = {
|
||||||
|
codeAction = {
|
||||||
|
disableRuleComment = {
|
||||||
|
enable = true,
|
||||||
|
location = "separateLine"
|
||||||
|
},
|
||||||
|
showDocumentation = {
|
||||||
|
enable = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
codeActionOnSave = {
|
||||||
|
enable = false,
|
||||||
|
mode = "all"
|
||||||
|
},
|
||||||
|
experimental = {
|
||||||
|
useFlatConfig = false
|
||||||
|
},
|
||||||
|
format = true,
|
||||||
|
nodePath = "",
|
||||||
|
onIgnoredFiles = "off",
|
||||||
|
problems = {
|
||||||
|
shortenToSingleLine = false
|
||||||
|
},
|
||||||
|
quiet = false,
|
||||||
|
rulesCustomizations = {},
|
||||||
|
run = "onType",
|
||||||
|
useESLintClass = false,
|
||||||
|
validate = "on",
|
||||||
|
workingDirectory = {
|
||||||
|
mode = "location"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "gopls" },
|
cmd = { "gopls" },
|
||||||
filetypes = { "go", "gomod", "gowork", "gotmpl" }
|
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
|
root_markers = { ".git" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "lemminx" },
|
cmd = { "lemminx" },
|
||||||
filetypes = { "xml", "xsd", "xsl", "xslt", "svg" }
|
filetypes = { "xml", "xsd", "xsl", "xslt", "svg" },
|
||||||
|
root_markers = { ".git" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,19 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "lua-language-server" },
|
cmd = { "lua-language-server" },
|
||||||
filetypes = { "lua" }
|
filetypes = { "lua" },
|
||||||
|
root_markers = { ".git" },
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'vim' },
|
||||||
|
},
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "pyright-langserver", "--stdio" },
|
cmd = { "pyright-langserver", "--stdio" },
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
|
root_markers = { "pyproject.toml" },
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
python = {
|
python = {
|
||||||
analysis = {
|
analysis = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "ruff", "server" },
|
cmd = { "ruff", "server" },
|
||||||
filetypes = { "python" }
|
filetypes = { "python" },
|
||||||
|
root_markers = { "pyproject.toml" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,27 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "tailwindcss-language-server", "--stdio" },
|
cmd = { "tailwindcss-language-server", "--stdio" },
|
||||||
filetypes = { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" },
|
filetypes = { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" },
|
||||||
settings = {
|
root_markers = { ".git" },
|
||||||
tailwindCSS = {
|
|
||||||
classAttributes = { "class", "className", "classList", "class:list", "ngClass", "pathClassName" },
|
settings = {
|
||||||
experimental = {
|
tailwindCSS = {
|
||||||
classRegex = {
|
classAttributes = { "class", "className", "classList", "class:list", "ngClass", "pathClassName" },
|
||||||
{
|
experimental = {
|
||||||
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
classRegex = {
|
||||||
"'([^']*)'",
|
{
|
||||||
},
|
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
||||||
{
|
"'([^']*)'",
|
||||||
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
},
|
||||||
'"([^"]*)"',
|
{
|
||||||
},
|
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
||||||
{
|
'"([^"]*)"',
|
||||||
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
},
|
||||||
"`([^`]*)`",
|
{
|
||||||
},
|
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
|
||||||
|
"`([^`]*)`",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "vtsls", "--stdio" },
|
cmd = { "vtsls", "--stdio" },
|
||||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
|
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
|
||||||
|
root_markers = { ".git" },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,6 @@ opt.syntax = "enable"
|
||||||
|
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.undodir = vim.fn.expand("~/.vim/undodir")
|
|
||||||
vim.opt.undofile = true
|
|
||||||
|
|
||||||
if vim.fn.has("termguicolors") == 1 then
|
if vim.fn.has("termguicolors") == 1 then
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
return {
|
return {
|
||||||
{
|
'saghen/blink.cmp',
|
||||||
'saghen/blink.cmp',
|
dependencies = 'rafamadriz/friendly-snippets',
|
||||||
dependencies = 'rafamadriz/friendly-snippets',
|
version = '*',
|
||||||
version = '*',
|
|
||||||
---@module 'blink.cmp'
|
|
||||||
---@type blink.cmp.Config
|
|
||||||
opts = {
|
|
||||||
keymap = { preset = 'default' },
|
|
||||||
appearance = {
|
|
||||||
use_nvim_cmp_as_default = true,
|
|
||||||
nerd_font_variant = 'mono'
|
|
||||||
},
|
|
||||||
signature = { enabled = true },
|
|
||||||
completion = {
|
|
||||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts_extend = { "sources.default" },
|
|
||||||
} }
|
|
||||||
|
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
keymap = { preset = 'default' },
|
||||||
|
appearance = {
|
||||||
|
use_nvim_cmp_as_default = true,
|
||||||
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
signature = { enabled = true },
|
||||||
|
completion = {
|
||||||
|
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,154 +1,162 @@
|
||||||
return {
|
return {
|
||||||
{
|
"FeiyouG/commander.nvim",
|
||||||
"FeiyouG/commander.nvim",
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
|
||||||
init = function()
|
|
||||||
require("commander").setup({
|
|
||||||
integration = {
|
|
||||||
telescope = {
|
|
||||||
enable = true,
|
|
||||||
theme = require("telescope.themes").commander,
|
|
||||||
},
|
|
||||||
lazy = {
|
|
||||||
enable = true,
|
|
||||||
set_plugin_name_as_cat = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("commander").add({
|
|
||||||
{
|
|
||||||
desc = "Find git files",
|
|
||||||
cmd = ":FzfLua git_files<CR>",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua files<CR>",
|
|
||||||
desc = "Find files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua buffers<CR>",
|
|
||||||
desc = "Buffer list",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua quickfix<CR>",
|
|
||||||
desc = "Quickfix",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua quickfix_stack<CR>",
|
|
||||||
desc = "Quickfix History",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua command_history<CR>",
|
|
||||||
desc = "Command History",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua git_commits<CR>",
|
|
||||||
desc = "Git commits",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua git_bcommits<CR>",
|
|
||||||
desc = "Git buffer commits",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":FzfLua git_branches<CR>",
|
|
||||||
desc = "Git branches",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":GV<CR>",
|
|
||||||
desc = "Git log",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":Git blame",
|
|
||||||
desc = "Git blame",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":DiffviewOpen<CR>",
|
|
||||||
desc = "Diff view",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":UndotreeToggle<CR>",
|
|
||||||
desc = "Undotree",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":EslintFixAll<CR>",
|
|
||||||
desc = "ESLint: autofix all problems",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":'<,'>sort",
|
|
||||||
desc = "Sort",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":Fidget history<CR>",
|
|
||||||
desc = "Error/notification history",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":lua Snacks.terminal.toggle()<CR>",
|
|
||||||
desc = "Terminal",
|
|
||||||
keys = { "n", "<leader>t" },
|
|
||||||
set = false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":GitConflicts<CR>",
|
|
||||||
desc = "Git conflicts to quickfix",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":LastCommitToQuickfix<CR>",
|
|
||||||
desc = "Last Commit To quickfix",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":ForkToQuickfix<CR>",
|
|
||||||
desc = "Branch commits to quickfix",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":Trouble diagnostics toggle focus=false filter.buf=0<CR>",
|
|
||||||
desc = "Diagnostic window (current buffer)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":Trouble symbols toggle pinned=true results.win.relative=win results.win.position=right<CR>",
|
|
||||||
desc = "Symbols",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":PackageInfoShow<CR>",
|
|
||||||
desc = "Show package.json versions",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":PackageInfoHide<CR>",
|
|
||||||
desc = "Hide package.json versions",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":PackageInfoUpdate<CR>",
|
|
||||||
desc = "Update package.json dependency",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":CoAuthor<CR>",
|
|
||||||
desc = "Add Git CoAuthor",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
cmd = ":TailwindConcealToggle<CR>",
|
|
||||||
desc = "Toggle conceal tailwind classes",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("Commander", function(args)
|
init = function()
|
||||||
require("commander").show()
|
require("commander").setup({
|
||||||
end, {
|
integration = {
|
||||||
desc = "Show commands",
|
telescope = {
|
||||||
nargs = "*",
|
enable = true,
|
||||||
})
|
theme = require("telescope.themes").commander,
|
||||||
|
},
|
||||||
vim.api.nvim_create_user_command("LastCommitToQuickfix", function(args)
|
lazy = {
|
||||||
require("utils.telescope").last_commit_to_quickfix()
|
enable = true,
|
||||||
end, {
|
set_plugin_name_as_cat = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("commander").add({
|
||||||
|
{
|
||||||
|
desc = "Find git files",
|
||||||
|
cmd = ":FzfLua git_files<CR>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua files<CR>",
|
||||||
|
desc = "Find files",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua buffers<CR>",
|
||||||
|
desc = "Buffer list",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua quickfix<CR>",
|
||||||
|
desc = "Quickfix",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua quickfix_stack<CR>",
|
||||||
|
desc = "Quickfix History",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua command_history<CR>",
|
||||||
|
desc = "Command History",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua git_commits<CR>",
|
||||||
|
desc = "Git commits",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua git_bcommits<CR>",
|
||||||
|
desc = "Git buffer commits",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":FzfLua git_branches<CR>",
|
||||||
|
desc = "Git branches",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":GV<CR>",
|
||||||
|
desc = "Git log",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":Git blame",
|
||||||
|
desc = "Git blame",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":DiffviewOpen<CR>",
|
||||||
|
desc = "Diff view",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":UndotreeToggle<CR>",
|
||||||
|
desc = "Undotree",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":EslintFixAll<CR>",
|
||||||
|
desc = "ESLint: autofix all problems",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":'<,'>sort",
|
||||||
|
desc = "Sort",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":lua Snacks.notifier.show_history()<CR>",
|
||||||
|
desc = "Error/notification history",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":lua Snacks.terminal.toggle()<CR>",
|
||||||
|
desc = "Terminal",
|
||||||
|
keys = { "n", "<leader>t" },
|
||||||
|
set = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":GitConflicts<CR>",
|
||||||
|
desc = "Git conflicts to quickfix",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":LastCommitToQuickfix<CR>",
|
||||||
desc = "Last Commit To quickfix",
|
desc = "Last Commit To quickfix",
|
||||||
nargs = "?",
|
},
|
||||||
})
|
{
|
||||||
|
cmd = ":ForkToQuickfix<CR>",
|
||||||
|
desc = "Branch commits to quickfix",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":Trouble diagnostics toggle focus=false filter.buf=0<CR>",
|
||||||
|
desc = "Diagnostic window (current buffer)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd =
|
||||||
|
":Trouble symbols toggle pinned=true results.win.relative=win results.win.position=right<CR>",
|
||||||
|
desc = "Symbols",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":PackageInfoShow<CR>",
|
||||||
|
desc = "Show package.json versions",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":PackageInfoHide<CR>",
|
||||||
|
desc = "Hide package.json versions",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":PackageInfoUpdate<CR>",
|
||||||
|
desc = "Update package.json dependency",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":CoAuthor<CR>",
|
||||||
|
desc = "Add Git CoAuthor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":TailwindConcealToggle<CR>",
|
||||||
|
desc = "Toggle conceal tailwind classes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":OutputPanel<CR>",
|
||||||
|
desc = "Toggle LSP Output Panel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cmd = ":KeyAnalyzer",
|
||||||
|
desc =
|
||||||
|
"Show diagram of mapped keys under the first parameter key"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("ForkToQuickfix", function(args)
|
vim.api.nvim_create_user_command("Commander", function(args)
|
||||||
require("utils.telescope").fork_to_quickfix(args.fargs[1])
|
require("commander").show()
|
||||||
end, {
|
end, {
|
||||||
desc = "Branch changes to quickfix",
|
desc = "Show commands",
|
||||||
nargs = "?",
|
nargs = "*",
|
||||||
})
|
})
|
||||||
end,
|
|
||||||
},
|
vim.api.nvim_create_user_command("LastCommitToQuickfix", function(args)
|
||||||
|
require("utils.telescope").last_commit_to_quickfix()
|
||||||
|
end, {
|
||||||
|
desc = "Last Commit To quickfix",
|
||||||
|
nargs = "?",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("ForkToQuickfix", function(args)
|
||||||
|
require("utils.telescope").fork_to_quickfix(args.fargs[1])
|
||||||
|
end, {
|
||||||
|
desc = "Branch changes to quickfix",
|
||||||
|
nargs = "?",
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
return {{
|
return {
|
||||||
"folke/flash.nvim",
|
"folke/flash.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
|
||||||
opts = {},
|
opts = {},
|
||||||
}}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
return {
|
return {
|
||||||
{
|
"ibhagwan/fzf-lua",
|
||||||
"ibhagwan/fzf-lua",
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
opts = {
|
||||||
require("fzf-lua").setup({
|
keymap = {
|
||||||
keymap = {
|
fzf = {
|
||||||
fzf = {
|
["ctrl-q"] = "select-all+accept",
|
||||||
["ctrl-q"] = "select-all+accept",
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
})
|
}
|
||||||
end
|
|
||||||
} }
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"dnlhc/glance.nvim",
|
"dnlhc/glance.nvim",
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local glance = require("glance")
|
local glance = require("glance")
|
||||||
local actions = glance.actions
|
local actions = glance.actions
|
||||||
|
|
@ -14,7 +15,7 @@ return {
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
list = {
|
list = {
|
||||||
["j"] = actions.next, -- Bring the cursor to the next item in the list
|
["j"] = actions.next, -- Bring the cursor to the next item in the list
|
||||||
["k"] = actions.previous, -- Bring the cursor to the previous item in the list
|
["k"] = actions.previous, -- Bring the cursor to the previous item in the list
|
||||||
["<Down>"] = actions.next,
|
["<Down>"] = actions.next,
|
||||||
["<Up>"] = actions.previous,
|
["<Up>"] = actions.previous,
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ft = "hurl",
|
ft = "hurl",
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
-- Show debugging info
|
-- Show debugging info
|
||||||
debug = false,
|
debug = false,
|
||||||
|
|
@ -73,7 +74,8 @@ return {
|
||||||
email ..
|
email ..
|
||||||
"\",\"password\":\"" ..
|
"\",\"password\":\"" ..
|
||||||
password ..
|
password ..
|
||||||
"\",\"clientType\":\"CLIENT_TYPE_WEB\"}' " .. firebaseUrl .. "?key=" ..
|
"\",\"clientType\":\"CLIENT_TYPE_WEB\"}' " ..
|
||||||
|
firebaseUrl .. "?key=" ..
|
||||||
firebaseKey)
|
firebaseKey)
|
||||||
local rawdata = h:read("all")
|
local rawdata = h:read("all")
|
||||||
h:close()
|
h:close()
|
||||||
|
|
|
||||||
5
lua/plugins/key-analyzer.nvim.lua
Normal file
5
lua/plugins/key-analyzer.nvim.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
"meznaric/key-analyzer.nvim",
|
||||||
|
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
5
lua/plugins/lsp-lens.nvim.lua
Normal file
5
lua/plugins/lsp-lens.nvim.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
'VidocqH/lsp-lens.nvim',
|
||||||
|
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
|
|
@ -43,15 +43,19 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_lines = true
|
virtual_lines = {
|
||||||
|
current_line = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
tools_to_install = {
|
tools_to_install = {
|
||||||
"lua-language-server", "vtsls", "ruff", "mypy", "black", "pyright", "tailwindcss-language-server",
|
"lua-language-server", "vtsls", "ruff", "mypy", "black",
|
||||||
|
"pyright", "tailwindcss-language-server",
|
||||||
"eslint-lsp", "lemminx", "gopls"
|
"eslint-lsp", "lemminx", "gopls"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -69,7 +73,9 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
config = function(_, opts)
|
dependencies = { "nvimtools/none-ls-extras.nvim" },
|
||||||
|
|
||||||
|
config = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
|
|
@ -81,6 +87,4 @@ return {
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,42 @@
|
||||||
return
|
return {
|
||||||
{
|
|
||||||
'nvimdev/lspsaga.nvim',
|
'nvimdev/lspsaga.nvim',
|
||||||
config = function()
|
|
||||||
require('lspsaga').setup({
|
|
||||||
symbol_in_winbar = {
|
|
||||||
enable = true,
|
|
||||||
hide_keyboard = true,
|
|
||||||
},
|
|
||||||
lightbulb = {
|
|
||||||
enable = true,
|
|
||||||
enable_in_insert = true,
|
|
||||||
cache_code_action = true,
|
|
||||||
sign = true,
|
|
||||||
update_time = 150,
|
|
||||||
sign_priority = 20,
|
|
||||||
virtual_text = false,
|
|
||||||
},
|
|
||||||
diagnostic = {
|
|
||||||
extend_relatedInformation = true,
|
|
||||||
},
|
|
||||||
finder = {
|
|
||||||
keys = {
|
|
||||||
vsplit = "s",
|
|
||||||
split = "v",
|
|
||||||
toggle_or_open = "<CR>",
|
|
||||||
shuttle = "<TAB>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
outline = {
|
|
||||||
keys = {
|
|
||||||
toggle_or_jump = "<CR>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
implement = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
}
|
},
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
symbol_in_winbar = {
|
||||||
|
enable = true,
|
||||||
|
hide_keyboard = true,
|
||||||
|
},
|
||||||
|
lightbulb = {
|
||||||
|
enable = true,
|
||||||
|
enable_in_insert = true,
|
||||||
|
cache_code_action = true,
|
||||||
|
sign = true,
|
||||||
|
update_time = 150,
|
||||||
|
sign_priority = 20,
|
||||||
|
virtual_text = false,
|
||||||
|
},
|
||||||
|
diagnostic = {
|
||||||
|
extend_relatedInformation = true,
|
||||||
|
},
|
||||||
|
finder = {
|
||||||
|
keys = {
|
||||||
|
vsplit = "s",
|
||||||
|
split = "v",
|
||||||
|
toggle_or_open = "<CR>",
|
||||||
|
shuttle = "<TAB>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
outline = {
|
||||||
|
keys = {
|
||||||
|
toggle_or_jump = "<CR>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
implement = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{ 'echasnovski/mini.files', version = '*', opts = {} }
|
'echasnovski/mini.files',
|
||||||
|
version = '*',
|
||||||
|
|
||||||
|
opts = { options = { use_as_default_explorer = false } }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{ 'echasnovski/mini.statusline', version = '*',opts = {} },
|
'echasnovski/mini.statusline',
|
||||||
|
version = '*',
|
||||||
|
|
||||||
|
opts = {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,21 @@
|
||||||
return {
|
return {
|
||||||
{
|
"bassamsdata/namu.nvim",
|
||||||
"bassamsdata/namu.nvim",
|
|
||||||
config = function()
|
opts = {
|
||||||
require("namu").setup({
|
-- Enable the modules you want
|
||||||
-- Enable the modules you want
|
namu_symbols = {
|
||||||
namu_symbols = {
|
enable = true,
|
||||||
enable = true,
|
options = {}, -- here you can configure namu
|
||||||
options = {}, -- here you can configure namu
|
},
|
||||||
},
|
-- Optional: Enable other modules if needed
|
||||||
-- Optional: Enable other modules if needed
|
ui_select = { enable = false }, -- vim.ui.select() wrapper
|
||||||
ui_select = { enable = false }, -- vim.ui.select() wrapper
|
colorscheme = {
|
||||||
colorscheme = {
|
enable = false,
|
||||||
enable = false,
|
options = {
|
||||||
options = {
|
-- NOTE: if you activate persist, then please remove any vim.cmd("colorscheme ...") in your config, no needed anymore
|
||||||
-- NOTE: if you activate persist, then please remove any vim.cmd("colorscheme ...") in your config, no needed anymore
|
persist = true, -- very efficient mechanism to Remember selected colorscheme
|
||||||
persist = true, -- very efficient mechanism to Remember selected colorscheme
|
write_shada = false, -- If you open multiple nvim instances, then probably you need to enable this
|
||||||
write_shada = false, -- If you open multiple nvim instances, then probably you need to enable this
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ return {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
close_if_last_window = true,
|
close_if_last_window = true,
|
||||||
filesystem = {
|
filesystem = {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ return {
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
|
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
lua/plugins/output-panel.nvim.lua
Normal file
8
lua/plugins/output-panel.nvim.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"mhanberg/output-panel.nvim",
|
||||||
|
version = "*",
|
||||||
|
event = "VeryLazy",
|
||||||
|
|
||||||
|
opts = {},
|
||||||
|
cmd = { "OutputPanel" },
|
||||||
|
}
|
||||||
|
|
@ -11,4 +11,3 @@ return { {
|
||||||
bufdelete = { enabled = true },
|
bufdelete = { enabled = true },
|
||||||
},
|
},
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
return {
|
return {
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
init = function()
|
|
||||||
require("tokyonight").setup({transparent = true, dim_inactive = true, lualine_bold = true})
|
init = function()
|
||||||
vim.cmd("colo tokyonight-night")
|
require("tokyonight").setup({ transparent = true, dim_inactive = true, lualine_bold = true })
|
||||||
end
|
vim.cmd("colo tokyonight-night")
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
return {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
run = ':TSUpdate',
|
run = ':TSUpdate',
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local configs = require("nvim-treesitter.configs")
|
local configs = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
|
@ -29,4 +30,3 @@ return {
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
18
lua/plugins/undotree.lua
Normal file
18
lua/plugins/undotree.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
return {
|
||||||
|
"mbbill/undotree",
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
if vim.fn.has("persistent_undo") == 1 then
|
||||||
|
local target_path = vim.fn.expand("~/.undodir")
|
||||||
|
|
||||||
|
-- Create the directory if it doesn't exist
|
||||||
|
if vim.fn.isdirectory(target_path) == 0 then
|
||||||
|
vim.fn.mkdir(target_path, "p", "0700")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set the undodir and enable undo file
|
||||||
|
vim.o.undodir = target_path
|
||||||
|
vim.o.undofile = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -1 +1,3 @@
|
||||||
return {{"tpope/vim-fugitive"}}
|
return {
|
||||||
|
"tpope/vim-fugitive"
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,301 +1,292 @@
|
||||||
return {
|
return {
|
||||||
{
|
"folke/which-key.nvim",
|
||||||
"folke/which-key.nvim",
|
|
||||||
init = function()
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.add({
|
|
||||||
{ "<A-j>", ":m .+1<cr>==", desc = "Move line down" },
|
|
||||||
{ "<A-k>", ":m .-2<cr>==", desc = "Move line up" },
|
|
||||||
{
|
|
||||||
mode = "v",
|
|
||||||
{ "<A-j>", ":m '>+1<CR>gv=gv", desc = "Move line down" },
|
|
||||||
{ "<A-k>", ":m '<-2<CR>gv=gv", desc = "Move line up" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "i",
|
|
||||||
{ "<A-j>", "<Esc>:m .+1<CR>==gi", desc = "Move line down" },
|
|
||||||
{ "<A-k>", "<Esc>:m .-2<CR>==gi", desc = "Move line up" },
|
|
||||||
},
|
|
||||||
|
|
||||||
{ "<c-\\>", "<cmd>Commander<cr>", desc = "Commander" },
|
init = function()
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.add({
|
||||||
|
{ "<A-j>", ":m .+1<cr>==", desc = "Move line down" },
|
||||||
|
{ "<A-k>", ":m .-2<cr>==", desc = "Move line up" },
|
||||||
|
{
|
||||||
|
mode = "v",
|
||||||
|
{ "<A-j>", ":m '>+1<CR>gv=gv", desc = "Move line down" },
|
||||||
|
{ "<A-k>", ":m '<-2<CR>gv=gv", desc = "Move line up" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "i",
|
||||||
|
{ "<A-j>", "<Esc>:m .+1<CR>==gi", desc = "Move line down" },
|
||||||
|
{ "<A-k>", "<Esc>:m .-2<CR>==gi", desc = "Move line up" },
|
||||||
|
},
|
||||||
|
|
||||||
{ "<C-p>", "<cmd>FzfLua git_files<cr>", desc = "Find git files" },
|
{ "<c-\\>", "<cmd>Commander<cr>", desc = "Commander" },
|
||||||
|
|
||||||
{ ",", group = "Search" },
|
{ "<C-p>", "<cmd>FzfLua git_files<cr>", desc = "Find git files" },
|
||||||
{ ",p", "<cmd>FzfLua files<cr>", desc = "Files files" },
|
|
||||||
{ ",b", "<cmd>FzfLua buffers<cr>", desc = "Buffer List" },
|
|
||||||
{ ",q", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix" },
|
|
||||||
{ ",c", "<cmd>FzfLua command_history<cr>", desc = "Quickfix" },
|
|
||||||
{ ",e", ":e **/*<C-z><S-Tab>", desc = "Open with autocomplete" },
|
|
||||||
{ ",f", ":find **/*<C-z><S-Tab>", desc = "Find with autocomplete" },
|
|
||||||
|
|
||||||
{ "<leader>p", group = "Search" },
|
{ ",", group = "Search" },
|
||||||
{ "<leader>pc", "<cmd>FzfLua git_commits<cr>", desc = "Git commits" },
|
{ ",p", "<cmd>FzfLua files<cr>", desc = "Files files" },
|
||||||
{ "<leader>pf", "<cmd>FzfLua git_bcommits<cr>", desc = "Git file history" },
|
{ ",b", "<cmd>FzfLua buffers<cr>", desc = "Buffer List" },
|
||||||
{ "<leader>pb", "<cmd>FzfLua git_branches<cr>", desc = "Git branches" },
|
{ ",q", "<cmd>FzfLua quickfix<cr>", desc = "Quickfix" },
|
||||||
{ "<leader>ph", "<cmd>FzfLua git_statuscr>", desc = "Git status" },
|
{ ",c", "<cmd>FzfLua command_history<cr>", desc = "Quickfix" },
|
||||||
{
|
{ ",e", ":e **/*<C-z><S-Tab>", desc = "Open with autocomplete" },
|
||||||
"<leader>ps",
|
{ ",f", ":find **/*<C-z><S-Tab>", desc = "Find with autocomplete" },
|
||||||
"<cmd>FzfLua live_grep<cr>",
|
|
||||||
desc = "Project search"
|
|
||||||
},
|
|
||||||
|
|
||||||
-- {
|
{ "<leader>p", group = "Search" },
|
||||||
-- "<leader>ds",
|
{ "<leader>pc", "<cmd>FzfLua git_commits<cr>", desc = "Git commits" },
|
||||||
-- function()
|
{ "<leader>pf", "<cmd>FzfLua git_bcommits<cr>", desc = "Git file history" },
|
||||||
-- require("utils.telescope").search_dotfiles()
|
{ "<leader>pb", "<cmd>FzfLua git_branches<cr>", desc = "Git branches" },
|
||||||
-- end,
|
{ "<leader>ph", "<cmd>FzfLua git_statuscr>", desc = "Git status" },
|
||||||
-- desc = "Search dot files 🔭",
|
{
|
||||||
-- },
|
"<leader>ps",
|
||||||
|
"<cmd>FzfLua live_grep<cr>",
|
||||||
|
desc = "Project search"
|
||||||
|
},
|
||||||
|
|
||||||
{ "K", "<cmd>Lspsaga hover_doc<cr>", desc = "Show documentation" },
|
-- {
|
||||||
{ "<C-k>", "<cmd>Lspsaga hover_doc ++keep<cr>", desc = "Show documentation (keep)" },
|
-- "<leader>ds",
|
||||||
{ "<f2>", "<cmd>Lspsaga rename<cr>", desc = "Rename variable" },
|
-- function()
|
||||||
{ "g", group = "Go to" },
|
-- require("utils.telescope").search_dotfiles()
|
||||||
{ "gd", ":Lspsaga goto_definition<cr>", desc = "Go to definition" },
|
-- end,
|
||||||
{
|
-- desc = "Search dot files 🔭",
|
||||||
"gD",
|
-- },
|
||||||
function()
|
|
||||||
vim.lsp.buf.declaration()
|
|
||||||
end,
|
|
||||||
desc = "Go to declaration",
|
|
||||||
},
|
|
||||||
{ "gt", ":Lspsaga goto_type_definition<cr>", desc = "Go to type definition" },
|
|
||||||
{ "gh", ":Lspsaga finder<cr>", desc = "LSP Finder" },
|
|
||||||
{ "gH", ":Lspsaga finder ++normal<cr>", desc = "LSP Finder (keep)" },
|
|
||||||
{ "gj", ":Lspsaga diagnostic_jump_next<cr>", desc = "Next diagnostic message" },
|
|
||||||
{ "gk", ":Lspsaga diagnostic_jump_prev<cr>", desc = "Previous diagnostic message" },
|
|
||||||
|
|
||||||
{ "<localleader>a", group = "Local File Actions" },
|
{ "K", "<cmd>Lspsaga hover_doc<cr>", desc = "Show documentation" },
|
||||||
{ "<localleader>ac", "<cmd>Lspsaga code_action<cr>", desc = "Code action" },
|
{ "<C-k>", "<cmd>Lspsaga hover_doc ++keep<cr>", desc = "Show documentation (keep)" },
|
||||||
{
|
{ "grn", "<cmd>Lspsaga rename<cr>", desc = "Rename variable" },
|
||||||
"<localleader>ag",
|
{ "g", group = "Go to" },
|
||||||
function()
|
{ "gd", ":Lspsaga goto_definition<cr>", desc = "Go to definition" },
|
||||||
vim.diagnostic.open_float(0, { scope = "line", focusable = false })
|
{
|
||||||
end,
|
"gD",
|
||||||
desc = "Show line diagnostics",
|
function()
|
||||||
},
|
vim.lsp.buf.declaration()
|
||||||
{
|
end,
|
||||||
"<localleader>ad",
|
desc = "Go to declaration",
|
||||||
"<cmd>Glance definitions<cr>",
|
},
|
||||||
desc = "Definitions",
|
{ "gt", ":Lspsaga goto_type_definition<cr>", desc = "Go to type definition" },
|
||||||
},
|
{ "gh", ":Lspsaga finder<cr>", desc = "LSP Finder" },
|
||||||
{
|
{ "gH", ":Lspsaga finder ++normal<cr>", desc = "LSP Finder (keep)" },
|
||||||
"<localleader>ar",
|
{ "<localleader>a", group = "Local File Actions" },
|
||||||
"<cmd>Glance references<cr>",
|
{ "gra", mode = { "n", "v" }, "<cmd>Lspsaga code_action<cr>", desc = "Code action" },
|
||||||
desc = "References",
|
{
|
||||||
},
|
"<localleader>ag",
|
||||||
{
|
function()
|
||||||
"<localleader>ai",
|
vim.diagnostic.open_float(0,
|
||||||
"<cmd>Glance implementations<cr>",
|
{ scope = "line", focusable = false })
|
||||||
desc = "References",
|
end,
|
||||||
},
|
desc = "Show line diagnostics",
|
||||||
{
|
},
|
||||||
"<localleader>at",
|
{
|
||||||
"<cmd>Glance type_definitions<cr>",
|
"grd",
|
||||||
desc = "Type definitions",
|
"<cmd>Glance definitions<cr>",
|
||||||
},
|
desc = "Definitions",
|
||||||
{
|
},
|
||||||
"<localleader>aI",
|
{
|
||||||
"<cmd>Lspsaga incoming_calls<cr>",
|
"grr",
|
||||||
desc = "Incoming calls",
|
"<cmd>Glance references<cr>",
|
||||||
},
|
desc = "References",
|
||||||
{
|
},
|
||||||
"<localleader>aO",
|
{
|
||||||
"<cmd>Lspsaga outgoing_calls<cr>",
|
"gri",
|
||||||
desc = "Outgoing calls",
|
"<cmd>Glance implementations<cr>",
|
||||||
},
|
desc = "Implementations",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"grt",
|
||||||
|
"<cmd>Glance type_definitions<cr>",
|
||||||
|
desc = "Type definitions",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"grI",
|
||||||
|
"<cmd>Lspsaga incoming_calls<cr>",
|
||||||
|
desc = "Incoming calls",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"grO",
|
||||||
|
"<cmd>Lspsaga outgoing_calls<cr>",
|
||||||
|
desc = "Outgoing calls",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"<localleader>O",
|
"gO",
|
||||||
"<cmd>Lspsaga outline<cr>",
|
"<cmd>Lspsaga outline<cr>",
|
||||||
desc = "Toggle Outline",
|
desc = "Toggle Outline",
|
||||||
icon = "",
|
icon = "",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"<leader>g",
|
"<leader>g",
|
||||||
group = "Git",
|
group = "Git",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>gd",
|
"<leader>gd",
|
||||||
"<cmd>DiffviewOpen<cr>",
|
"<cmd>DiffviewOpen<cr>",
|
||||||
desc = "Diff view",
|
desc = "Diff view",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"»",
|
">",
|
||||||
"]",
|
"]",
|
||||||
noremap = false,
|
noremap = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"«",
|
"<",
|
||||||
"[",
|
"[",
|
||||||
noremap = false,
|
noremap = false,
|
||||||
},
|
},
|
||||||
{ "<localleader>h", group = "git signs" },
|
{ "<localleader>h", group = "git signs" },
|
||||||
|
{
|
||||||
|
"<localleader>hs",
|
||||||
|
function()
|
||||||
|
require("gitsigns").stage_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Stage hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hu",
|
||||||
|
function()
|
||||||
|
require("gitsigns").undo_stage_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Undo stage hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hv",
|
||||||
|
function()
|
||||||
|
require("gitsigns").preview_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Preview hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hb",
|
||||||
|
function()
|
||||||
|
require("gitsigns").blame_line()
|
||||||
|
end,
|
||||||
|
desc = "Blame line",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hR",
|
||||||
|
function()
|
||||||
|
require("gitsigns").reset_buffer()
|
||||||
|
end,
|
||||||
|
desc = "Reset buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hr",
|
||||||
|
function()
|
||||||
|
require("gitsigns").reset_hunk()
|
||||||
|
end,
|
||||||
|
desc = "Reset hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hS",
|
||||||
|
function()
|
||||||
|
require("gitsigns").stage_buffer()
|
||||||
|
end,
|
||||||
|
desc = "Stage buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<localleader>hU",
|
||||||
|
function()
|
||||||
|
require("gitsigns").reset_buffer_index()
|
||||||
|
end,
|
||||||
|
desc = "Reset buffer index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "v",
|
||||||
{
|
{
|
||||||
"<localleader>hs",
|
"<localleader>hs",
|
||||||
function()
|
function()
|
||||||
require("gitsigns").stage_hunk()
|
require("gitsigns").stage_hunk({ vim.fn.line("."),
|
||||||
|
vim.fn.line("v") })
|
||||||
end,
|
end,
|
||||||
desc = "Stage hunk",
|
desc = "Stage hunk",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"<localleader>hu",
|
|
||||||
function()
|
|
||||||
require("gitsigns").undo_stage_hunk()
|
|
||||||
end,
|
|
||||||
desc = "Undo stage hunk",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<localleader>hv",
|
|
||||||
function()
|
|
||||||
require("gitsigns").preview_hunk()
|
|
||||||
end,
|
|
||||||
desc = "Preview hunk",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<localleader>hb",
|
|
||||||
function()
|
|
||||||
require("gitsigns").blame_line()
|
|
||||||
end,
|
|
||||||
desc = "Blame line",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<localleader>hR",
|
|
||||||
function()
|
|
||||||
require("gitsigns").reset_buffer()
|
|
||||||
end,
|
|
||||||
desc = "Reset buffer",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"<localleader>hr",
|
"<localleader>hr",
|
||||||
function()
|
function()
|
||||||
require("gitsigns").reset_hunk()
|
require("gitsigns").reset_hunk({ vim.fn.line("."),
|
||||||
|
vim.fn.line("v") })
|
||||||
end,
|
end,
|
||||||
desc = "Reset hunk",
|
desc = "Reset hunk",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"]c",
|
||||||
|
function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal({ "]c", bang = true })
|
||||||
|
else
|
||||||
|
vim.schedule(function()
|
||||||
|
require("gitsigns").nav_hunk("next")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "Next hunk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"[c",
|
||||||
|
function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
vim.cmd.normal({ "[c", bang = true })
|
||||||
|
else
|
||||||
|
vim.schedule(function()
|
||||||
|
require("gitsigns").nav_hunk("prev")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "Previous hunk",
|
||||||
|
},
|
||||||
|
|
||||||
|
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "Undotree", icon = "" },
|
||||||
|
|
||||||
|
{ "<leader>c", group = "quickfix" },
|
||||||
|
{ "<leader>co", "<cmd>copen<cr>", desc = "Open" },
|
||||||
|
{ "<leader>cc", "<cmd>cclose<cr>", desc = "Close" },
|
||||||
|
|
||||||
|
{ "<localleader>c", group = "Location List" },
|
||||||
|
{ "<localleader>co", "<cmd>lopen<cr>", desc = "Open" },
|
||||||
|
{ "<localleader>cc", "<cmd>lclose<cr>", desc = "Close" },
|
||||||
|
|
||||||
|
{ "<C-n>", "<cmd>Neotree toggle<cr>", desc = "Toggle neo-tree" },
|
||||||
|
|
||||||
|
{ "<leader>t", "<cmd>lua Snacks.terminal.toggle()<cr>", desc = "Toggle Terminal" },
|
||||||
|
{ mode = { "t" }, { "<leader>t", "<cmd>lua Snacks.terminal.toggle()<cr>", desc = "Toggle Terminal" } },
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = { "n", "x", "o" },
|
||||||
{
|
{
|
||||||
"<localleader>hS",
|
"s",
|
||||||
function()
|
function()
|
||||||
require("gitsigns").stage_buffer()
|
require("flash").jump()
|
||||||
end,
|
end,
|
||||||
desc = "Stage buffer",
|
desc = "Flash ⚡",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<localleader>hU",
|
"S",
|
||||||
function()
|
function()
|
||||||
require("gitsigns").reset_buffer_index()
|
require("flash").treesitter()
|
||||||
end,
|
end,
|
||||||
desc = "Reset buffer index",
|
desc = "Flash Treesitter ⚡",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = { "o", "x" },
|
||||||
{
|
{
|
||||||
mode = "v",
|
"R",
|
||||||
{
|
|
||||||
"<localleader>hs",
|
|
||||||
function()
|
|
||||||
require("gitsigns").stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
|
||||||
end,
|
|
||||||
desc = "Stage hunk",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<localleader>hr",
|
|
||||||
function()
|
|
||||||
require("gitsigns").reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
|
||||||
end,
|
|
||||||
desc = "Reset hunk",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"]c",
|
|
||||||
function()
|
function()
|
||||||
if vim.wo.diff then
|
require("flash").treesitter_search()
|
||||||
vim.cmd.normal({ "]c", bang = true })
|
|
||||||
else
|
|
||||||
vim.schedule(function()
|
|
||||||
require("gitsigns").nav_hunk("next")
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
desc = "Next hunk",
|
desc = "Flash Treesitter search ⚡",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode = "c",
|
||||||
{
|
{
|
||||||
"[c",
|
"<C-s>",
|
||||||
function()
|
function()
|
||||||
if vim.wo.diff then
|
require("flash").toggle()
|
||||||
vim.cmd.normal({ "[c", bang = true })
|
|
||||||
else
|
|
||||||
vim.schedule(function()
|
|
||||||
require("gitsigns").nav_hunk("prev")
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
desc = "Previous hunk",
|
desc = "Toggle Flash Search ⚡",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "Undotree", icon = "" },
|
})
|
||||||
|
end,
|
||||||
{ "<leader>c", group = "quickfix" },
|
|
||||||
{ "<leader>co", "<cmd>copen<cr>", desc = "Open" },
|
|
||||||
{ "<leader>cf", "<cmd>cfirst<cr>", desc = "First result" },
|
|
||||||
{ "<leader>cl", "<cmd>clast<cr>", desc = "Last result" },
|
|
||||||
{ "<leader>cn", "<cmd>cnext<cr>", desc = "Next result" },
|
|
||||||
{ "<leader>cp", "<cmd>cprevious<cr>", desc = "Previous result" },
|
|
||||||
{ "<leader>cc", "<cmd>cclose<cr>", desc = "Close" },
|
|
||||||
|
|
||||||
{ "<localleader>c", group = "Location List" },
|
|
||||||
{ "<localleader>co", "<cmd>lopen<cr>", desc = "Open" },
|
|
||||||
{ "<localleader>cf", "<cmd>lfirst<cr>", desc = "First result" },
|
|
||||||
{ "<localleader>cl", "<cmd>llast<cr>", desc = "Last result" },
|
|
||||||
{ "<localleader>cn", "<cmd>lnext<cr>", desc = "Next result" },
|
|
||||||
{ "<localleader>cp", "<cmd>lprevious<cr>", desc = "Previous result" },
|
|
||||||
{ "<localleader>cc", "<cmd>lclose<cr>", desc = "Close" },
|
|
||||||
|
|
||||||
{ "<C-n>", "<cmd>Neotree toggle<cr>", desc = "Toggle neo-tree" },
|
|
||||||
|
|
||||||
{ "<leader>t", "<cmd>lua Snacks.terminal.toggle()<cr>", desc = "Toggle Terminal" },
|
|
||||||
{ mode = { "t" }, { "<leader>t", "<cmd>lua Snacks.terminal.toggle()<cr>", desc = "Toggle Terminal" } },
|
|
||||||
|
|
||||||
{
|
|
||||||
mode = { "n", "x", "o" },
|
|
||||||
{
|
|
||||||
"s",
|
|
||||||
function()
|
|
||||||
require("flash").jump()
|
|
||||||
end,
|
|
||||||
desc = "Flash ⚡",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"S",
|
|
||||||
function()
|
|
||||||
require("flash").treesitter()
|
|
||||||
end,
|
|
||||||
desc = "Flash Treesitter ⚡",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = { "o", "x" },
|
|
||||||
{
|
|
||||||
"R",
|
|
||||||
function()
|
|
||||||
require("flash").treesitter_search()
|
|
||||||
end,
|
|
||||||
desc = "Flash Treesitter search ⚡",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "c",
|
|
||||||
{
|
|
||||||
"<C-s>",
|
|
||||||
function()
|
|
||||||
require("flash").toggle()
|
|
||||||
end,
|
|
||||||
desc = "Toggle Flash Search ⚡",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue