Compare commits

...

29 Commits

Author SHA1 Message Date
7f5b98fe5b chore: update package version 2025-11-08 10:44:37 +05:30
97959e7612 refactor: lua snip config updated 2025-11-08 10:43:12 +05:30
6422e8f548 refactor: add lspconfig for json 2025-11-08 10:42:59 +05:30
09dd7d7ec9 refactor: add eslint for the typescript react 2025-11-08 10:42:47 +05:30
8835a8c42e chore: update lock file 2025-08-29 12:55:08 +05:30
65bcd43d61 refactor: disabled supermaven 2025-08-29 12:55:00 +05:30
208e7232f7 refactor: minor tweaks to the zenmode 2025-08-29 12:54:49 +05:30
c88f69b0c0 refactor: enable go in treesitter 2025-08-29 12:54:31 +05:30
c71c03f498 refactor: add go plugin 2025-08-29 12:54:23 +05:30
Dinesh Salunke
4119e1d801 refactor: nvim comp supermaven etc 2025-07-15 15:49:36 +05:30
Dinesh Salunke
2cd785f5c1 refactor: add mcp hub 2025-04-20 13:26:58 +05:30
Dinesh Salunke
d0b0d60d6f refactor: add openai to avante 2025-04-20 13:26:47 +05:30
Dinesh Salunke
6184d4d42d chore: update the lazy lock file 2025-04-15 10:01:16 +05:30
Dinesh Salunke
9cf2f4fc3e refactor: switch the default provider to deepseek 2025-04-15 10:01:03 +05:30
Dinesh Salunke
95f58f6e65 refactor: add default ollama provider config and set it to codellama 2025-04-15 10:00:43 +05:30
Dinesh Salunke
9894ebf47f refactor: remove extra params for the providers 2025-04-15 10:00:06 +05:30
Dinesh Salunke
16fa48edd9 refactor: minor cleanup 2025-04-15 09:59:31 +05:30
Dinesh Salunke
92294e8382 refactor: add eslint_d for typescript conform 2025-04-15 09:59:19 +05:30
Dinesh Salunke
3465ba91cc refactor: increase the timeoutlen by another 100 ms 2025-04-06 14:47:50 +05:30
Dinesh Salunke
bb2c9b065a refactor: pick the nvim-cmp config from the kickstart config 2025-04-06 14:47:26 +05:30
Dinesh Salunke
30750acbc2 refactor: pick lsp config from kickstart.nvim and minor cleanup 2025-04-06 14:34:45 +05:30
Dinesh Salunke
30ead6068a refactor: configure avante for mistral and deepseek 2025-04-06 14:07:00 +05:30
Dinesh Salunke
123749b301 chore: lazy lock file updated 2025-04-05 18:00:35 +05:30
Dinesh Salunke
27cf9570ce refactor: minor config changes on the telescope 2025-04-05 18:00:24 +05:30
Dinesh Salunke
388652dad8 refactor: add the self hosted deepseek ai to the provider 2025-04-05 18:00:12 +05:30
Dinesh Salunke
25239c1a26 refactor: remove eslint from conform 2025-04-05 17:56:35 +05:30
Dinesh Salunke
5a26d0507a refactor: add todo comments plugin 2025-04-05 17:56:10 +05:30
Dinesh Salunke
1e52d38fa8 refactor: add avante plugin 2025-03-28 20:20:05 +05:30
Dinesh Salunke
4209b2e5fd refactor: add css html and svg formatter 2025-03-28 20:19:53 +05:30
19 changed files with 678 additions and 281 deletions

View File

@ -1,55 +1,61 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, "alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
"bufferline.nvim": { "branch": "main", "commit": "9f0826ae6adfd836a23bf8a4910e3c07450211f4" }, "avante.nvim": { "branch": "main", "commit": "935234981b01da1bbfc03de963eb5132e58fc805" },
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "catppuccin": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "990d37017e193fe40bdabf058e598e76f5e7d929" }, "conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" },
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" }, "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, "glow.nvim": { "branch": "main", "commit": "5d5954b2f22e109d4a6eba8b2618c5b96e4ee7a2" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "go.nvim": { "branch": "master", "commit": "81bb94c1d21648245eb14c69461f5c7f8c705752" },
"lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" }, "guihua.lua": { "branch": "master", "commit": "314b89924a798f3b2ef72e80270c5730286cebc5" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" }, "lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
"mdx.nvim": { "branch": "main", "commit": "ae83959b61a9fec8da228ebb5d6b045fd532d2cc" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" },
"mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" }, "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mcphub.nvim": { "branch": "main", "commit": "bb6741391f19ac93e335a72bd67a602ccdae0af7" },
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "mdx.nvim": { "branch": "main", "commit": "464a74be368dce212cff02f6305845dc7f209ab3" },
"mini.bufremove": { "branch": "main", "commit": "10857aa39160c127694151828914df3131ba83b6" },
"mini.indentscope": { "branch": "main", "commit": "0308f949f31769e509696af5d5f91cebb2159c69" },
"mini.pairs": { "branch": "main", "commit": "b316e68f2d242d5bd010deaab645daa27ed86297" },
"mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, "nvim-cmp": { "branch": "main", "commit": "106c4bcc053a5da783bf4a9d907b6f22485c2ea0" },
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "a8ef5e6e497b3ebeaaf35b939c07c211563b2e05" }, "nvim-lspconfig": { "branch": "master", "commit": "2010fc6ec03e2da552b4886fceb2f7bc0fc2e9c0" },
"nvim-notify": { "branch": "master", "commit": "bd9cd51f9ef2f6326fc2bc9931d0718c1794e247" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-spectre": { "branch": "master", "commit": "08be31c104df3b4b049607694ebb2b6ced4f928b" }, "nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
"nvim-treesitter": { "branch": "master", "commit": "b6492f41c46d9c3bc3550ecfb10c3f261e73cba6" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"smart-splits.nvim": { "branch": "master", "commit": "d2da32b76b89126609f4142bd55279c8723cb050" }, "schemastore.nvim": { "branch": "main", "commit": "976b31e094615b2c27009561b3c67a37c87c93c2" },
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, "smart-splits.nvim": { "branch": "master", "commit": "601cc6422b2b94af2e88d14358b81cf7dfb5db5f" },
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" }, "telescope.nvim": { "branch": "master", "commit": "0294ae3eafe662c438addb8692d9c98ef73a983e" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" },
"typescript-tools.nvim": { "branch": "master", "commit": "db26c05e267239581c89f5c825fdb8c3cf6da0c5" },
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" }, "vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" },
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" }
} }

View File

@ -37,7 +37,7 @@ opt.signcolumn = "yes"
opt.splitbelow = true opt.splitbelow = true
opt.splitright = true opt.splitright = true
opt.termguicolors = true opt.termguicolors = true
opt.timeoutlen = 400 opt.timeoutlen = 300
opt.undofile = true opt.undofile = true
opt.swapfile = false opt.swapfile = false

74
lua/plugins/avante.lua Normal file
View File

@ -0,0 +1,74 @@
return {
{
enabled = false,
"yetone/avante.nvim",
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
-- ⚠️ must add this setting! ! !
-- build = function()
-- -- conditionally use the correct build system for the current OS
-- if vim.fn.has("win32") == 1 then
-- return "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
-- else
-- return "make BUILD_FROM_SOURCE=true"
-- end
-- end,
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
---@module 'avante'
---@type avante.Config
opts = {
-- add any opts here
-- for example
provider = "copilot",
-- providers = {
-- claude = {
-- endpoint = "https://api.anthropic.com",
-- model = "claude-sonnet-4-20250514",
-- timeout = 30000, -- Timeout in milliseconds
-- extra_request_body = {
-- temperature = 0.75,
-- max_tokens = 20480,
-- },
-- },
-- },
},
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"echasnovski/mini.pick", -- for file_selector provider mini.pick
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
"stevearc/dressing.nvim", -- for input provider dressing
"folke/snacks.nvim", -- for input provider snacks
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
},
}

View File

@ -1,5 +1,4 @@
return { return {
{ {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
@ -20,7 +19,7 @@ return {
gitsigns = true, gitsigns = true,
nvimtree = true, nvimtree = true,
treesitter = true, treesitter = true,
notify = false, notify = true,
mini = { mini = {
enabled = true, enabled = true,
indentscope_color = "", indentscope_color = "",

View File

@ -4,8 +4,23 @@ return {
opts = {}, opts = {},
config = function() config = function()
local confrom = require("conform") local confrom = require("conform")
local util = require("conform.util")
confrom.setup({ confrom.setup({
log_level = vim.log.levels.DEBUG, log_level = vim.log.levels.DEBUG,
formatters = {
eslint_d = {
meta = {
url = "https://github.com/mantoni/eslint_d.js/",
description = "Like ESLint, but faster.",
},
command = util.from_node_modules("eslint_d"),
args = { "--fix-to-stdout", "--stdin", "--stdin-filename", "$FILENAME" },
stdin = true,
cwd = util.root_file({
"package.json",
}),
},
},
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
javascript = { "prettierd", "eslint_d" }, javascript = { "prettierd", "eslint_d" },
@ -15,6 +30,9 @@ return {
jsonc = { "prettierd" }, jsonc = { "prettierd" },
go = { "gofumpt", "goimports" }, go = { "gofumpt", "goimports" },
yaml = { "prettierd" }, yaml = { "prettierd" },
css = { "prettierd" },
html = { "prettierd" },
svg = { "prettierd" },
}, },
format_on_save = { format_on_save = {
timeout_ms = 500, timeout_ms = 500,

20
lua/plugins/go.lua Normal file
View File

@ -0,0 +1,20 @@
return {
{
"ray-x/go.nvim",
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
opts = {
-- lsp_keymaps = false,
-- other options
},
config = function(_lp, opts)
require("go").setup(opts)
end,
event = { "CmdlineEnter" },
ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
},
}

View File

@ -1,5 +1,4 @@
return { return {
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
cmd = "LspInfo", cmd = "LspInfo",
@ -8,44 +7,186 @@ return {
"BufNewFile", "BufNewFile",
}, },
dependencies = { dependencies = {
"folke/neodev.nvim", { "williamboman/mason.nvim", opts = {} },
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- Useful status updates for LSP.
{ "j-hui/fidget.nvim", opts = {} },
-- Allows extra capabilities provided by nvim-cmp
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
{ "williamboman/mason-lspconfig.nvim" }, "b0o/schemastore.nvim",
{
"williamboman/mason.nvim",
build = ":MasonUpdate",
},
}, },
config = function() config = function()
local lsp = require("lsp-zero") local util = require("lspconfig/util")
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp-attach", { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or "n"
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
end
lsp.on_attach(function(_) -- Jump to the definition of the word under your cursor.
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[N]ame" }) -- This is where a variable was first declared, or where a function is defined, etc.
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" }) -- To jump back, press <C-t>.
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, { desc = "[G]oto [D]efinition" }) map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
vim.keymap.set(
"n", -- Find references for the word under your cursor.
"<leader>gr", map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
require("telescope.builtin").lsp_references,
{ desc = "[G]oto [R]eference" } -- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation.
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
-- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*.
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
-- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc.
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
-- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project.
map(
"<leader>ws",
require("telescope.builtin").lsp_dynamic_workspace_symbols,
"[W]orkspace [S]ymbols"
) )
vim.keymap.set("n", "<leader>gI", vim.lsp.buf.implementation, { desc = "[G]oto [I]mplementation" })
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Hover Documentation" })
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, { desc = "Hover Documentation" })
end)
lsp.ensure_installed({ -- Rename the variable under your cursor.
"lua_ls", -- Most Language Servers support renaming across files, etc.
"gopls", map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
"yamlls",
"ruby_lsp", -- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" })
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
---@param client vim.lsp.Client
---@param method vim.lsp.protocol.Method
---@param bufnr? integer some lsp support methods only in specific files
---@return boolean
local function client_supports_method(client, method, bufnr)
if vim.fn.has("nvim-0.11") == 1 then
return client:supports_method(method, bufnr)
else
return client.supports_method(method, { bufnr = bufnr })
end
end
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
--
-- When you move your cursor, the highlights will be cleared (the second autocommand).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if
client
and client_supports_method(
client,
vim.lsp.protocol.Methods.textDocument_documentHighlight,
event.buf
)
then
local highlight_augroup = vim.api.nvim_create_augroup("lsp-highlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
}) })
local lspconfig = require("lspconfig") vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
local util = require("lspconfig/util") buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
lspconfig.lua_ls.setup(lsp.nvim_lua_ls()) vim.api.nvim_create_autocmd("LspDetach", {
lspconfig.gopls.setup({ group = vim.api.nvim_create_augroup("lsp-detach", { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds({ group = "lsp-highlight", buffer = event2.buf })
end,
})
end
-- The following code creates a keymap to toggle inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if
client
and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf)
then
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
end, "[T]oggle Inlay [H]ints")
end
end,
})
-- Diagnostic Config
-- See :help vim.diagnostic.Opts
vim.diagnostic.config({
severity_sort = true,
float = { border = "rounded", source = "if_many" },
underline = { severity = vim.diagnostic.severity.ERROR },
signs = vim.g.have_nerd_font and {
text = {
[vim.diagnostic.severity.ERROR] = "󰅚 ",
[vim.diagnostic.severity.WARN] = "󰀪 ",
[vim.diagnostic.severity.INFO] = "󰋽 ",
[vim.diagnostic.severity.HINT] = "󰌶 ",
},
} or {},
virtual_text = {
source = "if_many",
spacing = 2,
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
},
})
-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. Available keys are:
-- - cmd (table): Override the default command used to start the server
-- - filetypes (table): Override the default list of associated filetypes for the server
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
lua_ls = {
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
},
},
},
gopls = {
cmd = { "gopls" }, cmd = { "gopls" },
filetypes = { filetypes = {
"go", "go",
@ -54,10 +195,63 @@ return {
"gotmpl", "gotmpl",
}, },
root_dir = util.root_pattern("go.work", "go.mod", ".git"), root_dir = util.root_pattern("go.work", "go.mod", ".git"),
}) settings = {
lspconfig.ruby_lsp.setup({}) gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
},
jsonls = {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = { enable = true },
},
},
},
}
lsp.setup() -- Ensure the servers and tools above are installed
--
-- To check the current status of installed tools and/or manually install
-- other tools, you can run
-- :Mason
--
-- You can press `g?` for help in this menu.
--
-- `mason` had to be setup earlier: to configure its options see the
-- `dependencies` table for `nvim-lspconfig` above.
--
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
"stylua", -- Used to format Lua code
"prettierd",
"eslint_d",
"gopls",
"jsonls",
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
require("mason-lspconfig").setup({
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
})
end, end,
}, },
} }

12
lua/plugins/lspdev.lua Normal file
View File

@ -0,0 +1,12 @@
return {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
}

View File

@ -1,10 +0,0 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
branch = "v2.x",
lazy = true,
config = function()
require("lsp-zero.settings").preset({})
end,
},
}

View File

@ -2,10 +2,8 @@ return {
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
version = "2.*", version = "v2.*",
build = (not jit.os:find("Windows")) build = "make install_jsregexp",
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
or nil,
opts = { opts = {
history = true, history = true,
delete_check_events = "TextChanged", delete_check_events = "TextChanged",
@ -16,7 +14,7 @@ return {
history = true, history = true,
delete_check_events = "TextChanged", delete_check_events = "TextChanged",
}) })
require("luasnip.loaders.from_lua").load({ paths = "~/snippets" }) require("luasnip.loaders.from_lua").load({ paths = { "~/snippets" } })
end, end,
dependencies = { dependencies = {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",

22
lua/plugins/mcphub.lua Normal file
View File

@ -0,0 +1,22 @@
return {
{
"ravitemer/mcphub.nvim",
enabled = false,
dependencies = {
"nvim-lua/plenary.nvim",
},
cmd = "MCPHub",
build = "bundled_build.lua", -- Bundles mcp-hub locally
config = function()
require("mcphub").setup({
use_bundled_binary = true, -- Use local binary
-- ... rest of config as shown above
extensions = {
avante = {
make_slash_commands = true, -- make /slash commands from MCP server prompts
},
},
})
end,
},
}

View File

@ -1,7 +0,0 @@
return {
{
"folke/neodev.nvim",
opts = {},
},
}

View File

@ -1,113 +1,119 @@
return { return { -- Autocompletion
{
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
version = false,
event = "InsertEnter", event = "InsertEnter",
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", -- Snippet Engine & its associated nvim-cmp source
"hrsh7th/cmp-buffer", {
"hrsh7th/cmp-nvim-lua", "L3MON4D3/LuaSnip",
"hrsh7th/cmp-path", build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
return
end
return "make install_jsregexp"
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
},
},
"saadparwaiz1/cmp_luasnip", "saadparwaiz1/cmp_luasnip",
-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lsp-signature-help",
"onsails/lspkind.nvim",
}, },
config = function() config = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) -- See `:help cmp`
local luasnip = require("luasnip")
local cmp = require("cmp") local cmp = require("cmp")
local luasnip = require("luasnip")
luasnip.config.setup({})
local border_opts = {
border = {
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
{ "", "CmpDocBorder" },
},
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None",
}
---@diagnostic disable: missing-fields
cmp.setup({ cmp.setup({
formatting = {
preselect = cmp.PreselectMode.None,
fields = {
"abbr",
"kind",
"menu",
},
format = require("lspkind").cmp_format({
mode = "symbol_text",
maxwidth = 150,
ellipsis_char = "...",
before = function(entry, vim_item)
vim_item.menu = ({
nvim_lsp = "[LSP]",
buffer = "[Buffer]",
})[entry.source.name]
return vim_item
end,
}),
},
completion = {
completeopt = "menu,menuone,noinsert",
},
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
view = { completion = { completeopt = "menu,menuone,noinsert" },
docs = {
auto_open = true, -- For an understanding of why these mappings were
}, -- chosen, you will need to read `:help ins-completion`
}, --
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
-- Select the [n]ext item
["<C-j>"] = cmp.mapping.select_next_item(), ["<C-j>"] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
["<C-k>"] = cmp.mapping.select_prev_item(), ["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(), -- Scroll the documentation window [b]ack / [f]orward
["<CR>"] = cmp.mapping.confirm({ behavior = cmp.SelectBehavior.Replace, select = true }), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<Tab>"] = cmp.mapping(function(fallback) ["<C-f>"] = cmp.mapping.scroll_docs(4),
if cmp.visible() then
cmp.select_next_item() -- Accept ([y]es) the completion.
else -- This will auto-import if your LSP supports it.
fallback() -- This will expand snippets if the LSP sent a snippet.
-- ["<C-y>"] = cmp.mapping.confirm({ select = true }),
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
["<CR>"] = cmp.mapping.confirm({ select = true }),
--['<Tab>'] = cmp.mapping.select_next_item(),
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
["<C-Space>"] = cmp.mapping.complete({}),
-- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
-- function $name($args)
-- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
["<C-l>"] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback) ["<C-h>"] = cmp.mapping(function()
if cmp.visible() then if luasnip.locally_jumpable(-1) then
cmp.select_prev_item() luasnip.jump(-1)
else
fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<C-d>"] = function()
if cmp.visible_docs() then -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
cmp.close_docs() -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
else
cmp.open_docs()
end
end,
}), }),
sources = cmp.config.sources({ sources = {
{ name = "supermaven" },
{
name = "lazydev",
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
},
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "nvim_lsp_signature_help" }, { name = "nvim_lsp_signature_help" },
{ name = "luasnip" }, { name = "luasnip" },
{ name = "buffer" },
{ name = "path" }, { name = "path" },
}), { name = "nvim_lsp_signature_help" },
window = {
scrollbar = false,
completion = cmp.config.window.bordered(border_opts),
documentation = cmp.config.window.bordered(border_opts),
}, },
}) })
---@diagnostic enable: missing-fields
end, end,
},
} }

View File

@ -0,0 +1,9 @@
return {
{
enabled = false,
"supermaven-inc/supermaven-nvim",
config = function()
require("supermaven-nvim").setup({})
end,
},
}

View File

@ -3,6 +3,10 @@ return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-ui-select.nvim" },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
}, },
cmd = "Telescope", cmd = "Telescope",
keys = { keys = {
@ -33,14 +37,14 @@ return {
function() function()
require("telescope.builtin").git_files() require("telescope.builtin").git_files()
end, end,
desc = "Live grep", desc = "Git files",
}, },
{ {
"<leader>gs", "<leader>gs",
function() function()
require("telescope.builtin").git_status() require("telescope.builtin").git_status()
end, end,
desc = "Live grep", desc = "Git status",
}, },
{ {
"<leader>fc", "<leader>fc",
@ -103,11 +107,24 @@ return {
end, end,
desc = "[ L ]ist [ D ]ef[ i ]nitions", desc = "[ L ]ist [ D ]ef[ i ]nitions",
}, },
{
"<leader>bff",
function()
require("telescope.builtin").current_buffer_fuzzy_find()
end,
desc = "[ L ]ist [ D ]ef[ i ]nitions",
},
}, },
config = function(_, opts) config = function(_, opts)
local telescope = require("telescope") local telescope = require("telescope")
local builtin = require("telescope.builtin")
telescope.setup({ telescope.setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown(),
},
},
defaults = { defaults = {
prompt_prefix = "", prompt_prefix = "",
selection_caret = "", selection_caret = "",
@ -147,7 +164,28 @@ return {
}, },
}) })
telescope.load_extension("tnf") pcall(telescope.load_extension, "tnf")
pcall(telescope.load_extension, "fzf")
pcall(telescope.load_extension, "ui-select")
vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10,
previewer = false,
}))
end, { desc = "[/] Fuzzily search in current buffer" })
vim.keymap.set("n", "<leader>s/", function()
builtin.live_grep({
grep_open_files = true,
prompt_title = "Live Grep in Open Files",
})
end, { desc = "[S]earch [/] in Open Files" })
vim.keymap.set("n", "<leader>sn", function()
builtin.find_files({ cwd = vim.fn.stdpath("config") })
end, { desc = "[S]earch [N]eovim files" })
end, end,
}, },
} }

View File

@ -0,0 +1,8 @@
return {
{
"folke/todo-comments.nvim",
event = "VimEnter",
dependencies = { "nvim-lua/plenary.nvim" },
opts = { signs = false },
},
}

View File

@ -1,9 +1,9 @@
return { return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
commit = "b6492f41c46d9c3bc3550ecfb10c3f261e73cba6", branch = "master",
build = ":TSUpdate", build = ":TSUpdate",
version = false, lazy = false,
event = { event = {
"BufReadPost", "BufReadPost",
"BufNewFile", "BufNewFile",
@ -16,16 +16,10 @@ return {
{ "<bs>", desc = "Decrement selection", mode = "x" }, { "<bs>", desc = "Decrement selection", mode = "x" },
}, },
cmd = { "TSUpdateSync" }, cmd = { "TSUpdateSync" },
opts = { config = function()
require("nvim-treesitter.configs").setup({
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
ensure_installed = { ensure_installed = {
"bash", "bash",
"fish", "fish",
@ -59,7 +53,28 @@ return {
node_decremental = "<bs>", node_decremental = "<bs>",
}, },
}, },
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
}, },
indent = {
enable = true,
disable = { "go" },
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
})
end,
}, },
{ {
"nvim-treesitter/playground", "nvim-treesitter/playground",

View File

@ -1,15 +1,10 @@
return { return {
{ {
"pmizio/typescript-tools.nvim", "pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
config = function() config = function()
require("typescript-tools").setup({ local tstools = require("typescript-tools")
single_file_support = true, tstools.setup({})
settings = {
single_file_support = true,
},
})
vim.keymap.set( vim.keymap.set(
"n", "n",
"<leader>toi", "<leader>toi",

View File

@ -8,7 +8,7 @@ return {
function() function()
require("zen-mode").toggle({ require("zen-mode").toggle({
window = { window = {
width = 0.85, width = 0.75,
}, },
}) })
end, end,
@ -16,7 +16,7 @@ return {
}, },
opts = { opts = {
plugins = { plugins = {
twilight = { enabled = true }, twilight = { enabled = false },
}, },
}, },
}, },