Compare commits
17 Commits
ab2e588899
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4f8b345dd | ||
|
|
1aea2cfc68 | ||
|
9fa8ac630c
|
|||
|
3d6e9d215e
|
|||
|
97e81424fa
|
|||
|
|
ab352ba2a9 | ||
|
a8f250f96b
|
|||
|
95089a5a57
|
|||
|
9a7981eaba
|
|||
| 78b8e47080 | |||
|
dfab17ce27
|
|||
|
8a151a6430
|
|||
|
ebbe37bece
|
|||
|
211a543b71
|
|||
|
79556ce727
|
|||
|
cc288092b8
|
|||
|
3038404b0a
|
@@ -2,59 +2,60 @@
|
|||||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"any-jump.vim": { "branch": "master", "commit": "f95674d9a4251ac02f452d5f1861e4422f4652c7" },
|
"any-jump.vim": { "branch": "master", "commit": "f95674d9a4251ac02f452d5f1861e4422f4652c7" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "7ab1a6ec70a664ecb95d84669efc20aaf4f4ed1b" },
|
"catppuccin": { "branch": "main", "commit": "b7bbdf93b42866f166af98d39a2563eedb7cabac" },
|
||||||
"cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" },
|
"cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
|
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"codecompanion.nvim": { "branch": "main", "commit": "c3add8138fe624b794d2226fb04c8540cea73aa7" },
|
"codecompanion.nvim": { "branch": "main", "commit": "e55bbf5f6969ab41414d3fd68011366d3b80d024" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
|
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
|
||||||
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
|
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
|
||||||
"copilot-lualine": { "branch": "main", "commit": "dc4b8ed0f75bc2557b3158c526624bf04ad233ea" },
|
"copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" },
|
"copilot.lua": { "branch": "master", "commit": "a5c390f8d8e85b501b22dcb2f30e0cbbd69d5ff0" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "000448d837f6e7a47f8f342f29526c4d7e49e9ce" },
|
"dashboard-nvim": { "branch": "master", "commit": "591b5b29e2f17b97496ec3179f6ecd08bb8502cc" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
"gitsigns.nvim": { "branch": "main", "commit": "1796c7cedfe7e5dd20096c5d7b8b753d8f8d22eb" },
|
||||||
"goto-preview": { "branch": "main", "commit": "4751e70a6ebce4fb78327b097cb8fdff55f38f3a" },
|
"goto-preview": { "branch": "main", "commit": "d1faf6ea992b5bcaaaf2c682e1aba3131a01143e" },
|
||||||
"image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" },
|
"image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lsp_lines.nvim": { "branch": "main", "commit": "a92c755f182b89ea91bd8a6a2227208026f27b4d" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
|
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||||
"mini.diff": { "branch": "main", "commit": "bc3a7be30fd45ed4961ea90de1d9d04637cdeae6" },
|
"mcphub.nvim": { "branch": "main", "commit": "81394b54e292a50361aba11198e5fa4ebb97d304" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "e554890210cd29d017d6a0c1b1a46f995dcf9e64" },
|
"mini.diff": { "branch": "main", "commit": "7e268d0241255abaa07b8aa0ddff028f7315fe21" },
|
||||||
|
"mini.nvim": { "branch": "main", "commit": "90ab64f944a5a63a9efebe6735e1f2c6d4db3613" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "a66b5b9ad8d6a3f3dd8c0677a80eb27412fa5056" },
|
"none-ls.nvim": { "branch": "main", "commit": "a49f5a79cdb76e0dc1a98899c8598f4db014c5e7" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
"nui.nvim": { "branch": "main", "commit": "8d5b0b568517935d3c84f257f272ef004d9f5a59" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
|
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" },
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-html-css": { "branch": "main", "commit": "fa7e2da75edfd3d110fc8d4f8e5215b5de56ff42" },
|
"nvim-html-css": { "branch": "main", "commit": "23f53cbb8cf4ae7c302ba483ea8a28e5b03713a7" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" },
|
"nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "5344e00b86d1ea50c39a1da8af9f3d197234bcfe" },
|
"nvim-lspconfig": { "branch": "master", "commit": "46434074f188e6bfccf9d9153dd8be6b1381498b" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" },
|
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
|
"nvim-tree.lua": { "branch": "master", "commit": "be5b788f2dc1522c73fb7afad9092331c8aebe80" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "8f87d28442f7f91347e993661c319135f47729c7" },
|
"nvim-treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "6daca3ad780f045550b820f262002f35175a6c04" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" },
|
||||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||||
"odis": { "branch": "master", "commit": "5176a07a729860d0c0cdefe96252fc7ff9e16d43" },
|
"odis": { "branch": "master", "commit": "5176a07a729860d0c0cdefe96252fc7ff9e16d43" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "1cd546e96cb8520a148610ca86596ed238eeb936" },
|
"render-markdown.nvim": { "branch": "main", "commit": "b2d857c848c2c27440c8e5efc8e49a9b5bcf13c6" },
|
||||||
"telescope-color-names.nvim": { "branch": "main", "commit": "95b372b9a8ba0fc7cf6a67be637ee37453f322da" },
|
"telescope-color-names.nvim": { "branch": "main", "commit": "95b372b9a8ba0fc7cf6a67be637ee37453f322da" },
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"telescope-glyph.nvim": { "branch": "master", "commit": "f63f01e129e71cc25b79637610674bbf0be5ce9d" },
|
"telescope-glyph.nvim": { "branch": "master", "commit": "f63f01e129e71cc25b79637610674bbf0be5ce9d" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" },
|
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
||||||
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
|
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
|
||||||
|
|||||||
@@ -12,10 +12,14 @@ local nosilent = { noremap = true }
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = ","
|
vim.g.maplocalleader = ","
|
||||||
|
|
||||||
|
function create_custom_command(trigger, command, description)
|
||||||
|
-- Create a custom command with the given trigger, command, and description
|
||||||
|
vim.api.nvim_create_user_command(trigger, command, { desc = description })
|
||||||
|
end
|
||||||
-- Custom commands
|
-- Custom commands
|
||||||
vim.api.nvim_create_user_command("Config", "edit ~/.config/nvim", {})
|
create_custom_command("Config", "edit ~/.config/nvim", "Edit nvim configuration")
|
||||||
vim.api.nvim_create_user_command("Keymaps", "edit ~/.config/nvim/lua/core/keymaps.lua", {})
|
create_custom_command("Keymaps", "edit ~/.config/nvim/lua/core/keymaps.lua", "Edit Hyprland keybindings")
|
||||||
vim.api.nvim_create_user_command("Hypr", "edit ~/.config/hypr/hyprland.conf", {})
|
create_custom_command("Hypr", "edit ~/.config/hypr/hyprland.conf", "Edit Hyprland configuration")
|
||||||
|
|
||||||
-- {{{ Basic Mappings
|
-- {{{ Basic Mappings
|
||||||
local basic_mappings = {
|
local basic_mappings = {
|
||||||
@@ -34,10 +38,10 @@ local basic_mappings = {
|
|||||||
local buffer_navigation_mappings = {
|
local buffer_navigation_mappings = {
|
||||||
{ key = "<C-J>", cmd = ":bnext<CR>", desc = "Next buffer", mode = "n" },
|
{ key = "<C-J>", cmd = ":bnext<CR>", desc = "Next buffer", mode = "n" },
|
||||||
{ key = "<C-K>", cmd = ":bprev<CR>", desc = "Previous buffer", mode = "n" },
|
{ key = "<C-K>", cmd = ":bprev<CR>", desc = "Previous buffer", mode = "n" },
|
||||||
{ key = "<leader>bb", cmd = ":Telescope buffers<CR>", desc = "List buffers", mode = "n", group = "Buffers" },
|
{ key = "<leader>bb", cmd = ":Telescope buffers<CR>", desc = "List buffers", mode = "n" },
|
||||||
{ key = "<leader>bk", cmd = ":bdelete<CR>", desc = "Delete buffer", mode = "n", group = "Buffers" },
|
{ key = "<leader>bk", cmd = ":bdelete<CR>", desc = "Delete buffer", mode = "n" },
|
||||||
{ key = "<leader>bn", cmd = ":bnext<CR>", desc = "Next buffer", mode = "n", group = "Buffers" },
|
{ key = "<leader>bn", cmd = ":bnext<CR>", desc = "Next buffer", mode = "n" },
|
||||||
{ key = "<leader>bp", cmd = ":bprev<CR>", desc = "Previous buffer", mode = "n", group = "Buffers" },
|
{ key = "<leader>bp", cmd = ":bprev<CR>", desc = "Previous buffer", mode = "n" },
|
||||||
}
|
}
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
@@ -68,84 +72,72 @@ local terminal_mappings = {
|
|||||||
cmd = ":ToggleTerm name=toggleterm<CR>",
|
cmd = ":ToggleTerm name=toggleterm<CR>",
|
||||||
desc = "Toggle terminal",
|
desc = "Toggle terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Toggle",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>tT",
|
key = "<leader>tT",
|
||||||
cmd = ":ToggleTerm name=toggleterm-full direction=tab<CR>",
|
cmd = ":ToggleTerm name=toggleterm-full direction=tab<CR>",
|
||||||
desc = "Toggle full terminal",
|
desc = "Toggle full terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Toggle",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>ot",
|
key = "<leader>ot",
|
||||||
cmd = ":ToggleTerm name=toggleterm<CR>",
|
cmd = ":ToggleTerm name=toggleterm<CR>",
|
||||||
desc = "Open terminal",
|
desc = "Open terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Open",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>oT",
|
key = "<leader>oT",
|
||||||
cmd = ":ToggleTerm name=toggleterm-full direction=tab<CR>",
|
cmd = ":ToggleTerm name=toggleterm-full direction=tab<CR>",
|
||||||
desc = "Open full terminal",
|
desc = "Open full terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Open",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>ts",
|
key = "<leader>ts",
|
||||||
cmd = ":TermSelect<CR>",
|
cmd = ":TermSelect<CR>",
|
||||||
desc = "Select terminal",
|
desc = "Select terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Terminal",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>tv",
|
key = "<leader>tv",
|
||||||
cmd = ":ToggleTerm direction=vertical name=toggleterm-vert<CR>",
|
cmd = ":ToggleTerm direction=vertical name=toggleterm-vert<CR>",
|
||||||
desc = "Toggle vertical terminal",
|
desc = "Toggle vertical terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Terminal",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>th",
|
key = "<leader>th",
|
||||||
cmd = ":ToggleTerm direction=horizontal name=toggleterm-hori<CR>",
|
cmd = ":ToggleTerm direction=horizontal name=toggleterm-hori<CR>",
|
||||||
desc = "Toggle horizontal terminal",
|
desc = "Toggle horizontal terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Terminal",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>ov",
|
key = "<leader>ov",
|
||||||
cmd = ":ToggleTerm direction=vertical name=toggleterm-vert<CR>",
|
cmd = ":ToggleTerm direction=vertical name=toggleterm-vert<CR>",
|
||||||
desc = "Open vertical terminal",
|
desc = "Open vertical terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Open",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>oh",
|
key = "<leader>oh",
|
||||||
cmd = ":ToggleTerm direction=horizontal name=toggleterm-hori<CR>",
|
cmd = ":ToggleTerm direction=horizontal name=toggleterm-hori<CR>",
|
||||||
desc = "Open horizontal terminal",
|
desc = "Open horizontal terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Open",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>tf",
|
key = "<leader>tf",
|
||||||
cmd = ":ToggleTerm name=toggleterm<CR>",
|
cmd = ":ToggleTerm name=toggleterm<CR>",
|
||||||
desc = "Toggle terminal",
|
desc = "Toggle terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Terminal",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>-",
|
key = "<leader>-",
|
||||||
cmd = ":ToggleTerm direction='horizontal'<CR>",
|
cmd = ":ToggleTerm direction='horizontal'<CR>",
|
||||||
desc = "Toggle horizontal terminal",
|
desc = "Toggle horizontal terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Horizontal Terminal",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key = "<leader>|",
|
key = "<leader>|",
|
||||||
cmd = ":ToggleTerm direction='vertical'<CR>",
|
cmd = ":ToggleTerm direction='vertical'<CR>",
|
||||||
desc = "Toggle vertical terminal",
|
desc = "Toggle vertical terminal",
|
||||||
mode = "n",
|
mode = "n",
|
||||||
group = "Vertical Terminal",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
--}}}
|
--}}}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ o.syntax = "on"
|
|||||||
o.laststatus = 3
|
o.laststatus = 3
|
||||||
o.number = true
|
o.number = true
|
||||||
o.relativenumber = true
|
o.relativenumber = true
|
||||||
o.colorcolumn = "80"
|
o.colorcolumn = "88"
|
||||||
o.textwidth = 80
|
o.textwidth = 80
|
||||||
o.shiftwidth = 4
|
o.shiftwidth = 4
|
||||||
o.expandtab = true
|
o.expandtab = true
|
||||||
@@ -67,5 +67,19 @@ local border = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- set border for floating windows and signature help
|
-- set border for floating windows and signature help
|
||||||
l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
-- UNSUPPPORTED: https://github.com/neovim/neovim/issues/32242#issuecomment-2777120640
|
||||||
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
-- l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||||
|
-- l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||||
|
o.winborder = "rounded"
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true,
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
float = { border = "rounded", source = true },
|
||||||
|
severity_sort = true,
|
||||||
|
})
|
||||||
|
vim.keymap.set("", "<Leader>tl", function()
|
||||||
|
local current = vim.diagnostic.config().virtual_text
|
||||||
|
vim.diagnostic.config({ virtual_text = not current })
|
||||||
|
end, { desc = "Toggle diagnostics virtual text" })
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ return {
|
|||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
|
"ravitemer/mcphub.nvim",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
adapters = {
|
adapters = {
|
||||||
@@ -17,7 +18,9 @@ return {
|
|||||||
model = {
|
model = {
|
||||||
-- default = "claude-3.7-sonnet-thought",
|
-- default = "claude-3.7-sonnet-thought",
|
||||||
-- default = "o3-mini",
|
-- default = "o3-mini",
|
||||||
default = "gemini-2.0-flash-001",
|
-- default = "gemini-2.0-flash-001",
|
||||||
|
default = "gpt-4.1",
|
||||||
|
-- default = "gpt-4o",
|
||||||
-- default = "o3-mini-2025-01-31",
|
-- default = "o3-mini-2025-01-31",
|
||||||
-- choices = {
|
-- choices = {
|
||||||
-- ["o3-mini-2025-01-31"] = { opts = { can_reason = true } },
|
-- ["o3-mini-2025-01-31"] = { opts = { can_reason = true } },
|
||||||
@@ -26,7 +29,7 @@ return {
|
|||||||
-- "gpt-4o-2024-08-06",
|
-- "gpt-4o-2024-08-06",
|
||||||
-- "claude-3.7-sonnet-thought",
|
-- "claude-3.7-sonnet-thought",
|
||||||
-- "claude-3.7-sonnet",
|
-- "claude-3.7-sonnet",
|
||||||
-- "claude-3.5-sonnet",
|
-- "claude-3.5-sonnet",
|
||||||
-- "gemini-2.0-flash-001",
|
-- "gemini-2.0-flash-001",
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
@@ -77,7 +80,7 @@ return {
|
|||||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||||
env = {
|
env = {
|
||||||
url = "https://openrouter.ai/api",
|
url = "https://openrouter.ai/api",
|
||||||
api_key = "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",
|
api_key = "cmd:cat $HOME/.openrouterapikey",
|
||||||
chat_url = "/v1/chat/completions",
|
chat_url = "/v1/chat/completions",
|
||||||
},
|
},
|
||||||
schema = {
|
schema = {
|
||||||
@@ -94,8 +97,8 @@ return {
|
|||||||
},
|
},
|
||||||
strategies = {
|
strategies = {
|
||||||
chat = {
|
chat = {
|
||||||
-- adapter = "copilot",
|
adapter = "copilot",
|
||||||
adapter = "openrouter",
|
-- adapter = "openrouter",
|
||||||
roles = {
|
roles = {
|
||||||
llm = function(adapter)
|
llm = function(adapter)
|
||||||
if adapter.model == nil then
|
if adapter.model == nil then
|
||||||
@@ -134,8 +137,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
inline = {
|
inline = {
|
||||||
-- adapter = "copilot",
|
adapter = "copilot",
|
||||||
adapter = "openrouter",
|
-- adapter = "openrouter",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
display = {
|
display = {
|
||||||
@@ -191,6 +194,16 @@ return {
|
|||||||
log_level = "DEBUG",
|
log_level = "DEBUG",
|
||||||
-- log_level = "TRACE",
|
-- log_level = "TRACE",
|
||||||
},
|
},
|
||||||
|
extensions = {
|
||||||
|
mcphub = {
|
||||||
|
callback = "mcphub.extensions.codecompanion",
|
||||||
|
opts = {
|
||||||
|
show_result_in_chat = true, -- Show the mcp tool result in the chat buffer
|
||||||
|
make_vars = true, -- make chat #variables from MCP server resources
|
||||||
|
make_slash_commands = true, -- make /slash_commands from MCP server prompts
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
require("plugins.codecompanion.fidget-spinner"):init()
|
require("plugins.codecompanion.fidget-spinner"):init()
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
|
||||||
config = function()
|
|
||||||
-- lsp_lines
|
|
||||||
vim.diagnostic.config({ virtual_text = false })
|
|
||||||
-- --
|
|
||||||
vim.keymap.set("", "<Leader>tl", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,8 @@ return {
|
|||||||
vim.notify = require("notify")
|
vim.notify = require("notify")
|
||||||
local servers = {
|
local servers = {
|
||||||
"bashls",
|
"bashls",
|
||||||
"jedi_language_server",
|
-- "jedi_language_server",
|
||||||
|
"basedpyright",
|
||||||
"jsonls",
|
"jsonls",
|
||||||
-- "yamlls",
|
-- "yamlls",
|
||||||
"vimls",
|
"vimls",
|
||||||
@@ -19,28 +20,37 @@ return {
|
|||||||
"angularls",
|
"angularls",
|
||||||
"ansiblels",
|
"ansiblels",
|
||||||
"docker_compose_language_service",
|
"docker_compose_language_service",
|
||||||
|
"golangci_lint_ls",
|
||||||
|
"gopls",
|
||||||
|
}
|
||||||
|
-- Define the highlight color for float border
|
||||||
|
vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#89b4fa", bold = true })
|
||||||
|
local border = {
|
||||||
|
{ "╭", "FloatBorder" },
|
||||||
|
{ "─", "FloatBorder" },
|
||||||
|
{ "╮", "FloatBorder" },
|
||||||
|
{ "│", "FloatBorder" },
|
||||||
|
{ "╯", "FloatBorder" },
|
||||||
|
{ "─", "FloatBorder" },
|
||||||
|
{ "╰", "FloatBorder" },
|
||||||
|
{ "│", "FloatBorder" },
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
if lsp == "lua_ls" then
|
if lsp == "lua_ls" then
|
||||||
lspconfig[lsp].setup({
|
vim.lsp.enable(lsp)
|
||||||
-- on_attach = require("lsp-format").on_attach,
|
vim.lsp.config("lua_ls", {
|
||||||
on_attach = function()
|
|
||||||
vim.notify("Lua LSP attached", nil, { title = "LSP" })
|
|
||||||
end,
|
|
||||||
on_init = function(client)
|
on_init = function(client)
|
||||||
if client.workspace_folders then
|
if client.workspace_folders then
|
||||||
local path = client.workspace_folders[1].name
|
local path = client.workspace_folders[1].name
|
||||||
if
|
if
|
||||||
path ~= vim.fn.stdpath("config")
|
path ~= vim.fn.stdpath("config")
|
||||||
and (
|
and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc"))
|
||||||
vim.loop.fs_stat(path .. "/.luarc.json")
|
|
||||||
or vim.loop.fs_stat(path .. "/.luarc.jsonc")
|
|
||||||
)
|
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
|
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using
|
-- Tell the language server which version of Lua you're using
|
||||||
@@ -53,7 +63,7 @@ return {
|
|||||||
library = {
|
library = {
|
||||||
vim.env.VIMRUNTIME,
|
vim.env.VIMRUNTIME,
|
||||||
-- Depending on the usage, you might want to add additional paths here.
|
-- Depending on the usage, you might want to add additional paths here.
|
||||||
-- "${3rd}/luv/library"
|
-- "${3rd}/luv/library",
|
||||||
-- "${3rd}/busted/library",
|
-- "${3rd}/busted/library",
|
||||||
},
|
},
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower and will cause issues when working on your own configuration (see https://github.com/neovim/nvim-lspconfig/issues/3189)
|
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower and will cause issues when working on your own configuration (see https://github.com/neovim/nvim-lspconfig/issues/3189)
|
||||||
@@ -61,24 +71,36 @@ return {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
callSnippet = "Replace",
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {},
|
Lua = {},
|
||||||
},
|
},
|
||||||
|
handlers = {},
|
||||||
})
|
})
|
||||||
elseif lsp == "docker_compose_language_service" then
|
elseif lsp == "basedpyright" then
|
||||||
lspconfig[lsp].setup({
|
vim.lsp.enable(lsp)
|
||||||
filetypes = { "dockerfile", "docker-compose", "yaml", "yml" },
|
vim.lsp.config(lsp, {
|
||||||
on_attach = function()
|
analysis = {
|
||||||
vim.notify("Docker Compose LSP attached", nil, { title = "LSP" })
|
autoSearchPaths = true,
|
||||||
end,
|
diagnosticMode = "openFilesOnly",
|
||||||
|
useLibraryCodeForTypes = true,
|
||||||
|
},
|
||||||
|
diagnosticMode = "openFilesOnly",
|
||||||
|
inlayHints = {
|
||||||
|
callArgumentNames = true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
lspconfig[lsp].setup({
|
vim.lsp.enable(lsp)
|
||||||
on_attach = function()
|
-- vim.lsp.config(lsp, {
|
||||||
vim.notify(lsp .. " LSP attached", nil, { title = "LSP" })
|
-- handlers = {
|
||||||
end,
|
-- UNNSUUPPORTED
|
||||||
})
|
-- ["textDocument/signatureHelp"] = vim.lsp.with(
|
||||||
|
-- vim.lsp.handlers.signature_help,
|
||||||
|
-- { border = border }
|
||||||
|
-- ),
|
||||||
|
-- ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }),
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ return {
|
|||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
"seachcount",
|
"seachcount",
|
||||||
|
{ require("mcphub.extensions.lualine") },
|
||||||
"copilot",
|
"copilot",
|
||||||
symbols = {
|
symbols = {
|
||||||
status = {
|
status = {
|
||||||
|
|||||||
51
lua/plugins/mcphub.lua
Normal file
51
lua/plugins/mcphub.lua
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
return {
|
||||||
|
"ravitemer/mcphub.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
cmd = "MCPHub",
|
||||||
|
build = "bundled_build.lua", -- Bundles mcp-hub locally
|
||||||
|
config = function()
|
||||||
|
vim.notify = require("notify")
|
||||||
|
require("mcphub").setup({
|
||||||
|
use_bundled_binary = true, -- Use local binary
|
||||||
|
port = 37373, -- Port for MCP Hub Express API
|
||||||
|
config = vim.fn.expand("~/.config/mcphub/servers.json"), -- Config file path
|
||||||
|
native_servers = {}, -- add your native servers here
|
||||||
|
auto_approve = true,
|
||||||
|
extensions = {
|
||||||
|
avante = {},
|
||||||
|
codecompanion = {
|
||||||
|
show_result_in_chat = true, -- Show tool results in chat
|
||||||
|
make_vars = true, -- Create chat variables from resources
|
||||||
|
make_slash_commands = true, -- make /slash_commands from MCP server prompts
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- UI configuration
|
||||||
|
ui = {
|
||||||
|
window = {
|
||||||
|
width = 0.8, -- Window width (0-1 ratio)
|
||||||
|
height = 0.8, -- Window height (0-1 ratio)
|
||||||
|
border = "rounded", -- Window border style
|
||||||
|
relative = "editor", -- Window positioning
|
||||||
|
zindex = 50, -- Window stack order
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Event callbacks
|
||||||
|
on_ready = function(hub) end, -- Called when hub is ready
|
||||||
|
on_error = function(err)
|
||||||
|
vim.notify(err, "ERROR")
|
||||||
|
end, -- Called on errors
|
||||||
|
|
||||||
|
-- Logging configuration
|
||||||
|
log = {
|
||||||
|
level = vim.log.levels.WARN, -- Minimum log level
|
||||||
|
to_file = false, -- Enable file logging
|
||||||
|
file_path = nil, -- Custom log file path
|
||||||
|
prefix = "MCPHub", -- Log message prefix
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -48,6 +48,39 @@ return {
|
|||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
lsp_doc_border = true, -- add a border to hover docs and signature help
|
lsp_doc_border = true, -- add a border to hover docs and signature help
|
||||||
},
|
},
|
||||||
|
cmdline = {
|
||||||
|
enabled = true, -- enables the Noice cmdline UI
|
||||||
|
view = "cmdline_popup", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
|
||||||
|
opts = {}, -- global options for the cmdline. See section on views
|
||||||
|
---@type table<string, CmdlineFormat>
|
||||||
|
format = {
|
||||||
|
-- conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
|
||||||
|
-- view: (default is cmdline view)
|
||||||
|
-- opts: any options passed to the view
|
||||||
|
-- icon_hl_group: optional hl_group for the icon
|
||||||
|
-- title: set to anything or empty string to hide
|
||||||
|
cmdline = { pattern = "^:", icon = "", lang = "vim" },
|
||||||
|
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
||||||
|
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
||||||
|
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
||||||
|
lua = { pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, icon = "", lang = "lua" },
|
||||||
|
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
||||||
|
input = { view = "cmdline_input", icon = " " }, -- Used by input()
|
||||||
|
-- lua = false, -- to disable a format, set to `false`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
border = {
|
||||||
|
style = "none",
|
||||||
|
padding = { 0, 0 },
|
||||||
|
},
|
||||||
|
filter_options = {},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
|||||||
@@ -1,65 +1,73 @@
|
|||||||
return {
|
return {
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
local helpers = require("null-ls.helpers")
|
local helpers = require("null-ls.helpers")
|
||||||
-- syncronous formatting
|
-- syncronous formatting
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
|
||||||
-- null_ls.setup({
|
-- null_ls.setup({
|
||||||
-- on_attach = function(client)
|
-- on_attach = function(client)
|
||||||
-- if client.supports_method "textDocument/formatting" then
|
-- if client.supports_method "textDocument/formatting" then
|
||||||
-- vim.cmd([[
|
-- vim.cmd([[
|
||||||
-- augroup LspFormatting
|
-- augroup LspFormatting
|
||||||
-- autocmd! * <buffer>
|
-- autocmd! * <buffer>
|
||||||
-- autocmd BufWritePre <buffer> lua vim.lsp.buf.format()
|
-- autocmd BufWritePre <buffer> lua vim.lsp.buf.format()
|
||||||
-- augroup END
|
-- augroup END
|
||||||
-- ]])
|
-- ]])
|
||||||
-- end
|
-- end
|
||||||
-- end,
|
-- end,
|
||||||
-- })
|
-- })
|
||||||
-- you can reuse a shared lspconfig on_attach callback here
|
-- you can reuse a shared lspconfig on_attach callback here
|
||||||
|
|
||||||
|
require("null-ls").setup({
|
||||||
require('null-ls').setup({
|
on_attach = function(client, bufnr)
|
||||||
on_attach = function(client, bufnr)
|
if client.supports_method("textDocument/formatting") then
|
||||||
if client.supports_method("textDocument/formatting") then
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
group = augroup,
|
||||||
group = augroup,
|
buffer = bufnr,
|
||||||
buffer = bufnr,
|
callback = function()
|
||||||
callback = function()
|
-- on 0.8, you should use vim.lsp.buf.format({ bufnr = bufnr }) instead
|
||||||
-- on 0.8, you should use vim.lsp.buf.format({ bufnr = bufnr }) instead
|
-- on later neovim version, you should use vim.lsp.buf.format({ async = false }) instead
|
||||||
-- on later neovim version, you should use vim.lsp.buf.format({ async = false }) instead
|
-- vim.lsp.buf.formatting_sync()
|
||||||
-- vim.lsp.buf.formatting_sync()
|
vim.lsp.buf.format({
|
||||||
vim.lsp.buf.format({
|
async = false,
|
||||||
async = false,
|
bufnr = bufnr,
|
||||||
bufnr = bufnr,
|
filter = function(client)
|
||||||
filter = function(client)
|
return client.name == "null-ls"
|
||||||
return client.name == "null-ls"
|
end,
|
||||||
end,
|
})
|
||||||
})
|
end,
|
||||||
end,
|
})
|
||||||
})
|
end
|
||||||
end
|
end,
|
||||||
end,
|
sources = {
|
||||||
sources = {
|
null_ls.builtins.completion.luasnip,
|
||||||
null_ls.builtins.completion.luasnip,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.isort,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.diagnostics.mypy,
|
||||||
null_ls.builtins.diagnostics.mypy,
|
null_ls.builtins.diagnostics.markdownlint,
|
||||||
null_ls.builtins.diagnostics.markdownlint,
|
null_ls.builtins.diagnostics.pylint,
|
||||||
null_ls.builtins.diagnostics.pylint,
|
-- null_ls.builtins.diagnostics.pydocstyle.with({
|
||||||
-- null_ls.builtins.diagnostics.pydoclint,
|
-- extra_arags = { "--config=$ROOT/setup.cfg" },
|
||||||
null_ls.builtins.formatting.stylua,
|
-- }),
|
||||||
null_ls.builtins.formatting.markdownlint,
|
-- null_ls.builtins.diagnostics.pydoclint,
|
||||||
null_ls.builtins.formatting.prettier, -- handled by lsp server
|
null_ls.builtins.formatting.stylua,
|
||||||
null_ls.builtins.formatting.shfmt.with({
|
-- null_ls.builtins.formatting.stylua.with({
|
||||||
filetypes = { "sh", "bash" },
|
-- extra_args = { '--config-path', vim.fn.expand('~/.config/stylua.toml') },
|
||||||
extra_args = { "-i", "0", "-ci", "-sr" },
|
-- }),
|
||||||
}),
|
null_ls.builtins.formatting.markdownlint,
|
||||||
-- null_ls.builtins.diagnostics.actionlint,
|
null_ls.builtins.formatting.prettier, -- handled by lsp server
|
||||||
},
|
null_ls.builtins.formatting.shfmt.with({
|
||||||
})
|
filetypes = { "sh", "bash" },
|
||||||
end
|
extra_args = { "-i", "0", "-ci", "-sr" },
|
||||||
|
}),
|
||||||
|
null_ls.builtins.formatting.gofmt,
|
||||||
|
null_ls.builtins.formatting.goimports,
|
||||||
|
null_ls.builtins.formatting.goimports_reviser,
|
||||||
|
-- null_ls.builtins.diagnostics.actionlint,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
1
lua/plugins/nui.lua
Normal file
1
lua/plugins/nui.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
return { "MunifTanjim/nui.nvim" }
|
||||||
@@ -1,14 +1,34 @@
|
|||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-lint",
|
"mfussenegger/nvim-lint",
|
||||||
config = function()
|
config = function()
|
||||||
require("lint").linters_by_ft = {
|
local lint = require("lint")
|
||||||
|
lint.linters_by_ft = {
|
||||||
markdown = { "markdownlint" },
|
markdown = { "markdownlint" },
|
||||||
lua = { "luacheck" },
|
lua = { "luacheck" },
|
||||||
py = { "pylint", "pydocstyle", "pycodestyle", "mypy" },
|
py = { "flake8", "pylint", "pydocstyle", "pycodestyle", "mypy" },
|
||||||
sh = { "shellcheck" },
|
sh = { "shellcheck" },
|
||||||
json = { "jsonlint" },
|
json = { "jsonlint" },
|
||||||
yaml = { "yamllint" },
|
yaml = { "yamllint" },
|
||||||
vim = { "vint" },
|
vim = { "vint" },
|
||||||
|
go = { "golangcilint" },
|
||||||
}
|
}
|
||||||
|
local shellcheck = require("lint").linters.shellcheck
|
||||||
|
shellcheck.args = {
|
||||||
|
"-s",
|
||||||
|
"bash",
|
||||||
|
"-o",
|
||||||
|
"all",
|
||||||
|
"-e",
|
||||||
|
"2250",
|
||||||
|
}
|
||||||
|
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||||
|
group = lint_augroup,
|
||||||
|
callback = function()
|
||||||
|
lint.try_lint()
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
}
|
}
|
||||||
|
|||||||
1
lua/plugins/nvim-treesitter-context.lua
Normal file
1
lua/plugins/nvim-treesitter-context.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
return { "nvim-treesitter/nvim-treesitter-context" }
|
||||||
@@ -10,7 +10,6 @@ vim.notify = require("notify")
|
|||||||
---@usage addToWhichKey(mappings, group)
|
---@usage addToWhichKey(mappings, group)
|
||||||
---@example addToWhichKey({{key = "n", cmd = "next", mode = "n", desc = "Next Line", group = "Navigation"}, {key = "t", group = "example"})
|
---@example addToWhichKey({{key = "n", cmd = "next", mode = "n", desc = "Next Line", group = "Navigation"}, {key = "t", group = "example"})
|
||||||
function M.addToWhichKey(mappings, group)
|
function M.addToWhichKey(mappings, group)
|
||||||
local wk_mappings = {}
|
|
||||||
if group then
|
if group then
|
||||||
whichkey.add({ group.key, group = group.group })
|
whichkey.add({ group.key, group = group.group })
|
||||||
end
|
end
|
||||||
@@ -21,6 +20,7 @@ function M.addToWhichKey(mappings, group)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
for _, mapping in ipairs(mappings) do
|
for _, mapping in ipairs(mappings) do
|
||||||
|
local wk_mappings = {}
|
||||||
if not mapping.key or mapping.key == "" then
|
if not mapping.key or mapping.key == "" then
|
||||||
vim.notify("Error: Key is empty or nil", "error")
|
vim.notify("Error: Key is empty or nil", "error")
|
||||||
return
|
return
|
||||||
@@ -38,9 +38,11 @@ function M.addToWhichKey(mappings, group)
|
|||||||
|
|
||||||
wk_mappings[1] = mapping.key
|
wk_mappings[1] = mapping.key
|
||||||
wk_mappings[2] = mapping.cmd
|
wk_mappings[2] = mapping.cmd
|
||||||
wk_mappings.mode = mapping.mode
|
wk_mappings.mode = mapping.mode or "n"
|
||||||
wk_mappings.desc = mapping.desc or "No Description"
|
wk_mappings.desc = mapping.desc
|
||||||
wk_mappings.group = mapping.group or "No Group"
|
if mapping.group then
|
||||||
|
wk_mappings.group = mapping.group
|
||||||
|
end
|
||||||
whichkey.add(wk_mappings)
|
whichkey.add(wk_mappings)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user