Plugin changes
This commit is contained in:
parent
76a754de23
commit
523fedae4e
10 changed files with 289 additions and 210 deletions
|
@ -3,9 +3,9 @@ require("trouble").setup({
|
||||||
-- or leave it empty to use the default settings
|
-- or leave it empty to use the default settings
|
||||||
-- refer to the configuration section below
|
-- refer to the configuration section below
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>Trouble<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<leader>tx", "<cmd>Trouble<cr>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<leader>tw", "<cmd>Trouble workspace_diagnostics<cr>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("n", "<leader>xd", "<cmd>Trouble document_diagnostics<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<leader>td", "<cmd>Trouble document_diagnostics<cr>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("n", "<leader>xl", "<cmd>Trouble loclist<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<leader>tl", "<cmd>Trouble loclist<cr>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("n", "<leader>xq", "<cmd>Trouble quickfix<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<leader>tq", "<cmd>Trouble quickfix<cr>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>", { silent = true, noremap = true })
|
||||||
|
|
|
@ -1,47 +1,39 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
|
|
||||||
"Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" },
|
"Vim-Jinja2-Syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"blink.cmp": { "branch": "main", "commit": "4e9edba1b1cef1585cc65e54287229e5d34e4df8" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
"conform.nvim": { "branch": "master", "commit": "a0ab60ed666c56b37fd7ed1847d2ac52f2482ce0" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
|
||||||
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
|
|
||||||
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
|
|
||||||
"copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" },
|
|
||||||
"deepl.vim": { "branch": "main", "commit": "59df8cc17bb28989ce562bf4712c724d23baadcd" },
|
"deepl.vim": { "branch": "main", "commit": "59df8cc17bb28989ce562bf4712c724d23baadcd" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
"gen.nvim": { "branch": "main", "commit": "c8e1f574d4a3a839dde73a87bdc319a62ee1e559" },
|
"gen.nvim": { "branch": "main", "commit": "c8e1f574d4a3a839dde73a87bdc319a62ee1e559" },
|
||||||
"gina.vim": { "branch": "master", "commit": "ff6c2ddeca98f886b57fb42283c12e167d6ab575" },
|
"gina.vim": { "branch": "master", "commit": "ff6c2ddeca98f886b57fb42283c12e167d6ab575" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" },
|
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||||
"hover.nvim": { "branch": "main", "commit": "07c7269c3a88751f2f36ed0563dc6e7b8b84f7f7" },
|
"hover.nvim": { "branch": "main", "commit": "24a43e0eda924f1f32361c76ee9a1f0e8cc25650" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
|
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
|
||||||
"lsp-progress.nvim": { "branch": "main", "commit": "f3df1df8f5ea33d082db047b5d2d2b83cc01cd8a" },
|
"lsp-progress.nvim": { "branch": "main", "commit": "f61cb7a788e4695ed9ae5e1b6b01bfff8f136f8b" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "2923666d092300e6d03c8d895991d0bef43f1613" },
|
"lsp_signature.nvim": { "branch": "master", "commit": "62cadce83aaceed677ffe7a2d6a57141af7131ea" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
"lush.nvim": { "branch": "main", "commit": "1be16d9002f8b2e8973a19ceac199ad394dea76a" },
|
||||||
"lush.nvim": { "branch": "main", "commit": "45a79ec4acb5af783a6a29673a999ce37f00497e" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1ec4da522fa49dcecee8d190efda273464dd2192" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f54e3c11fc9ebfcfc27e696182b0295b071d0811" },
|
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
"multicursor.nvim": { "branch": "1.0", "commit": "9eedebdd395bbbc4711081e33b0606c079e054c3" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "ed993a4d945b5d37cb165df3f7172c34e7fce70e" },
|
"neoconf.nvim": { "branch": "main", "commit": "987be783f7e4cb9273e0e9b21c220f3b722b1ec6" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
"nvim-dap": { "branch": "master", "commit": "968f89f8aac11b6bdbfc942c71d3436658c1435f" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
"nvim-genghis": { "branch": "main", "commit": "0fccd6f547d954607083b66d08043b8ed54dee7a" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "2edd6375692d9ac1053d50acfe415c1eb2ba92d0" },
|
"nvim-jdtls": { "branch": "master", "commit": "7d1545614235cf6cf68b0839556d87c8f11c5eb5" },
|
||||||
"nvim-genghis": { "branch": "main", "commit": "16268746ae4617be8e8989748b9a0b0372f5e3b4" },
|
"nvim-lint": { "branch": "master", "commit": "ee04d481d4e6089892c2fb2ad8924b1a053591e1" },
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "4d77ff02063cf88963d5cf10683ab1fd15d072de" },
|
"nvim-lspconfig": { "branch": "master", "commit": "3d97ec4174bcc750d70718ddedabf150536a5891" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "0112e1f77983141e1453bd37d124302f1c876c46" },
|
|
||||||
"nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" },
|
"nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" },
|
||||||
"nvim-metals": { "branch": "main", "commit": "7b3057f85c7c76d85b9d2d3c97c9d34fcb9f1bdc" },
|
"nvim-metals": { "branch": "main", "commit": "db6c9ffb32ec698b96d11cba1317dccc26f5c16d" },
|
||||||
"nvim-quick-switcher": { "branch": "main", "commit": "b56ba55cff165ae1551836a79313933bf4d43ae2" },
|
"nvim-quick-switcher": { "branch": "main", "commit": "b56ba55cff165ae1551836a79313933bf4d43ae2" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4ae47f4fb18e85b80e84b729974fe65483b06aaf" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
"shipwright.nvim": { "branch": "master", "commit": "e596ab48328c31873f4f4d2e070243bf9de16ff3" },
|
"shipwright.nvim": { "branch": "master", "commit": "e596ab48328c31873f4f4d2e070243bf9de16ff3" },
|
||||||
"splice.vim": { "branch": "master", "commit": "815a28e687fdf78b67e9b9cd4c21277bbe658873" },
|
"splice.vim": { "branch": "master", "commit": "815a28e687fdf78b67e9b9cd4c21277bbe658873" },
|
||||||
|
@ -50,28 +42,27 @@
|
||||||
"telescope-lsp-handlers.nvim": { "branch": "trunk", "commit": "de02085d6af1633942549a238bc7a5524fa9b201" },
|
"telescope-lsp-handlers.nvim": { "branch": "trunk", "commit": "de02085d6af1633942549a238bc7a5524fa9b201" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
"vim-caddyfile": { "branch": "master", "commit": "6d60d5af0d73f20b88ec388a9d70188d55ed8223" },
|
||||||
"vim-characterize": { "branch": "master", "commit": "a8bffac6cead6b2869d939ecad06312b187a4c79" },
|
"vim-characterize": { "branch": "master", "commit": "a8bffac6cead6b2869d939ecad06312b187a4c79" },
|
||||||
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
|
||||||
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "593f831d6f6d779cbabb70a4d1e6b1b1936a88af" },
|
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||||
"vim-gitignore": { "branch": "master", "commit": "641dfa648d2581a5e5e9b0d11ffee37da8de49d7" },
|
"vim-gitignore": { "branch": "master", "commit": "641dfa648d2581a5e5e9b0d11ffee37da8de49d7" },
|
||||||
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
"vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" },
|
||||||
"vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" },
|
"vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" },
|
||||||
"vim-hocon": { "branch": "main", "commit": "5df6dc1b7c8f5811afe663b0441e6304a729dcaf" },
|
"vim-hocon": { "branch": "main", "commit": "5df6dc1b7c8f5811afe663b0441e6304a729dcaf" },
|
||||||
"vim-indent-object": { "branch": "master", "commit": "8ab36d5ec2a3a60468437a95e142ce994df598c6" },
|
"vim-indent-object": { "branch": "master", "commit": "8ab36d5ec2a3a60468437a95e142ce994df598c6" },
|
||||||
"vim-kitty": { "branch": "main", "commit": "309b8451cff8ad77a24ee332b5d9db4162f1655d" },
|
"vim-kitty": { "branch": "main", "commit": "5c3efc79af70dc2c22cad03e6a7374a5f81205d9" },
|
||||||
"vim-ledger": { "branch": "master", "commit": "aabf1976dfefe5665233c600421aea2798ff7ea0" },
|
"vim-ledger": { "branch": "master", "commit": "aabf1976dfefe5665233c600421aea2798ff7ea0" },
|
||||||
"vim-markdown-composer": { "branch": "master", "commit": "e6f99bc20cfcb277c63041b1f766e6d5940bcc76" },
|
"vim-markdown-composer": { "branch": "master", "commit": "e6f99bc20cfcb277c63041b1f766e6d5940bcc76" },
|
||||||
"vim-mkdir": { "branch": "master", "commit": "f0ba7a7dc190a0cedf1d827958c99f3718109cf0" },
|
"vim-mkdir": { "branch": "master", "commit": "f0ba7a7dc190a0cedf1d827958c99f3718109cf0" },
|
||||||
"vim-nftables": { "branch": "master", "commit": "26f8a506c6f3e41f1e4a8d6aa94c9a79a666bbff" },
|
"vim-nftables": { "branch": "master", "commit": "26f8a506c6f3e41f1e4a8d6aa94c9a79a666bbff" },
|
||||||
"vim-pass": { "branch": "master", "commit": "40d606f5b9488bf76273fd508addbee303f7b958" },
|
"vim-pass": { "branch": "master", "commit": "bb3ab598c4730e538eb3cefa39fbb8ed5775072c" },
|
||||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"vim-textobj-comment": { "branch": "master", "commit": "58ae4571b76a5bf74850698f23d235eef991dd4b" },
|
"vim-textobj-comment": { "branch": "master", "commit": "58ae4571b76a5bf74850698f23d235eef991dd4b" },
|
||||||
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
||||||
"vim-theme-chroma": { "branch": "lush", "commit": "0ad7be22f2244f99a877edfd6261eaba47952b6f" },
|
"vimtex": { "branch": "master", "commit": "dc90feacb86f7b85b0b791d8073eefc769a23725" },
|
||||||
"vimtex": { "branch": "master", "commit": "e10525a5aa65e2544f11e680dd81c77fba800248" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||||
"workspace-diagnostics.nvim": { "branch": "main", "commit": "60f9175b2501ae3f8b1aba9719c0df8827610c8e" }
|
"workspace-diagnostics.nvim": { "branch": "main", "commit": "60f9175b2501ae3f8b1aba9719c0df8827610c8e" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"workspace.checkThirdParty": false
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
-- Setup nvim-cmp.
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
--vim.fn["vsnip#anonymous"](args.body)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
|
|
||||||
-- For vsnip user.
|
|
||||||
{ name = "vsnip" },
|
|
||||||
|
|
||||||
-- For luasnip user.
|
|
||||||
-- { name = 'luasnip' },
|
|
||||||
|
|
||||||
-- For ultisnips user.
|
|
||||||
-- { name = 'ultisnips' },
|
|
||||||
|
|
||||||
{ name = "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Setup lsp.
|
|
||||||
metals_config = require("metals").bare_config
|
|
||||||
metals_config.init_options.statusBarProvider = "on"
|
|
||||||
metals_config.settings = { showImplicitArguments = true }
|
|
||||||
metals_config.on_attach = on_attach
|
|
||||||
metals_config.capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
|
@ -1,121 +1,122 @@
|
||||||
return {
|
return {}
|
||||||
{
|
--return {
|
||||||
"hrsh7th/nvim-cmp",
|
-- {
|
||||||
-- load cmp on InsertEnter
|
-- "hrsh7th/nvim-cmp",
|
||||||
event = "InsertEnter",
|
-- -- load cmp on InsertEnter
|
||||||
-- these dependencies will only be loaded when cmp loads
|
-- event = "InsertEnter",
|
||||||
-- dependencies are always lazy-loaded unless specified otherwise
|
-- -- these dependencies will only be loaded when cmp loads
|
||||||
dependencies = {
|
-- -- dependencies are always lazy-loaded unless specified otherwise
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
-- dependencies = {
|
||||||
"hrsh7th/cmp-buffer",
|
-- "hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-path",
|
-- "hrsh7th/cmp-buffer",
|
||||||
"hrsh7th/cmp-cmdline",
|
-- "hrsh7th/cmp-path",
|
||||||
-- 'hrsh7th/cmp-vsnip',
|
-- "hrsh7th/cmp-cmdline",
|
||||||
-- 'hrsh7th/vim-vsnip',
|
-- -- 'hrsh7th/cmp-vsnip',
|
||||||
-- 'hrsh7th/vim-vsnip-integ',
|
-- -- 'hrsh7th/vim-vsnip',
|
||||||
"L3MON4D3/LuaSnip",
|
-- -- 'hrsh7th/vim-vsnip-integ',
|
||||||
"saadparwaiz1/cmp_luasnip",
|
-- "L3MON4D3/LuaSnip",
|
||||||
"onsails/lspkind.nvim",
|
-- "saadparwaiz1/cmp_luasnip",
|
||||||
{
|
-- "onsails/lspkind.nvim",
|
||||||
"zbirenbaum/copilot-cmp",
|
-- {
|
||||||
dependencies = {
|
-- "zbirenbaum/copilot-cmp",
|
||||||
"hrsh7th/nvim-cmp",
|
-- dependencies = {
|
||||||
{
|
-- "hrsh7th/nvim-cmp",
|
||||||
"zbirenbaum/copilot.lua",
|
-- {
|
||||||
opts = {
|
-- "zbirenbaum/copilot.lua",
|
||||||
suggestion = { enabled = false },
|
-- opts = {
|
||||||
panel = { enabled = false },
|
-- suggestion = { enabled = false },
|
||||||
filetypes = {
|
-- panel = { enabled = false },
|
||||||
mail = false,
|
-- filetypes = {
|
||||||
text = false,
|
-- mail = false,
|
||||||
},
|
-- text = false,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
config = function()
|
-- },
|
||||||
require("copilot_cmp").setup()
|
-- config = function()
|
||||||
end,
|
-- require("copilot_cmp").setup()
|
||||||
},
|
-- end,
|
||||||
},
|
-- },
|
||||||
config = function()
|
-- },
|
||||||
local cmp = require("cmp")
|
-- config = function()
|
||||||
local lspkind = require("lspkind")
|
-- local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
-- local lspkind = require("lspkind")
|
||||||
local has_words_before = function()
|
-- local luasnip = require("luasnip")
|
||||||
unpack = unpack or table.unpack
|
-- local has_words_before = function()
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
-- unpack = unpack or table.unpack
|
||||||
return col ~= 0
|
-- local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
-- return col ~= 0
|
||||||
end
|
-- and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
|
-- end
|
||||||
cmp.setup({
|
--
|
||||||
snippet = {
|
-- cmp.setup({
|
||||||
expand = function(args)
|
-- snippet = {
|
||||||
--vim.fn["vsnip#anonymous"](args.body)
|
-- expand = function(args)
|
||||||
require("luasnip").lsp_expand(args.body)
|
-- --vim.fn["vsnip#anonymous"](args.body)
|
||||||
end,
|
-- require("luasnip").lsp_expand(args.body)
|
||||||
},
|
-- end,
|
||||||
mapping = {
|
-- },
|
||||||
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
-- mapping = {
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
-- ["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
-- ["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
-- ["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
-- ["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
-- ["<C-e>"] = cmp.mapping.abort(),
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
-- ["<CR>"] = cmp.mapping.confirm({
|
||||||
select = true,
|
-- behavior = cmp.ConfirmBehavior.Replace,
|
||||||
}),
|
-- select = true,
|
||||||
["<C-CR>"] = cmp.mapping({
|
-- }),
|
||||||
i = function(fallback)
|
-- ["<C-CR>"] = cmp.mapping({
|
||||||
if cmp.visible() and cmp.get_active_entry() then
|
-- i = function(fallback)
|
||||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
-- if cmp.visible() and cmp.get_active_entry() then
|
||||||
else
|
-- cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||||
fallback()
|
-- else
|
||||||
end
|
-- fallback()
|
||||||
end,
|
-- end
|
||||||
s = cmp.mapping.confirm({ select = true }),
|
-- end,
|
||||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
-- s = cmp.mapping.confirm({ select = true }),
|
||||||
}),
|
-- c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
-- }),
|
||||||
if cmp.visible() then
|
-- ["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
cmp.select_next_item()
|
-- if cmp.visible() then
|
||||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
-- cmp.select_next_item()
|
||||||
-- they way you will only jump inside the snippet region
|
-- -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
-- -- they way you will only jump inside the snippet region
|
||||||
luasnip.expand_or_jump()
|
-- elseif luasnip.expand_or_jumpable() then
|
||||||
elseif has_words_before() then
|
-- luasnip.expand_or_jump()
|
||||||
cmp.complete()
|
-- elseif has_words_before() then
|
||||||
else
|
-- cmp.complete()
|
||||||
fallback()
|
-- else
|
||||||
end
|
-- fallback()
|
||||||
end, { "i", "s" }),
|
-- end
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
-- end, { "i", "s" }),
|
||||||
if cmp.visible() then
|
-- ["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
cmp.select_prev_item()
|
-- if cmp.visible() then
|
||||||
elseif luasnip.jumpable(-1) then
|
-- cmp.select_prev_item()
|
||||||
luasnip.jump(-1)
|
-- elseif luasnip.jumpable(-1) then
|
||||||
else
|
-- luasnip.jump(-1)
|
||||||
fallback()
|
-- else
|
||||||
end
|
-- fallback()
|
||||||
end, { "i", "s" }),
|
-- end
|
||||||
},
|
-- end, { "i", "s" }),
|
||||||
sources = cmp.config.sources({
|
-- },
|
||||||
{ name = "nvim_lsp" },
|
-- sources = cmp.config.sources({
|
||||||
{ name = "luasnip" },
|
-- { name = "nvim_lsp" },
|
||||||
{ name = "copilot" },
|
-- { name = "luasnip" },
|
||||||
}, {
|
-- { name = "copilot" },
|
||||||
{ name = "buffer", option = { keyword_pattern = [[\k\+]] } },
|
-- }, {
|
||||||
--{ name = 'path' },
|
-- { name = "buffer", option = { keyword_pattern = [[\k\+]] } },
|
||||||
}),
|
-- --{ name = 'path' },
|
||||||
formatting = {
|
-- }),
|
||||||
format = lspkind.cmp_format({
|
-- formatting = {
|
||||||
mode = "symbol_text", -- show only symbol annotations
|
-- format = lspkind.cmp_format({
|
||||||
maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
-- mode = "symbol_text", -- show only symbol annotations
|
||||||
ellipsis_char = "…", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
-- maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||||
symbol_map = { Copilot = "" },
|
-- ellipsis_char = "…", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||||
}),
|
-- symbol_map = { Copilot = "" },
|
||||||
},
|
-- }),
|
||||||
})
|
-- },
|
||||||
end,
|
-- })
|
||||||
},
|
-- end,
|
||||||
}
|
-- },
|
||||||
|
--}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
return {
|
return {
|
||||||
"David-Kunz/gen.nvim",
|
"David-Kunz/gen.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
model = "mistral", -- The default model to use.
|
model = "gemma3:12b-it-qat", -- The default model to use.
|
||||||
init = false,
|
init = false,
|
||||||
},
|
},
|
||||||
cmd = "Gen",
|
cmd = "Gen",
|
||||||
|
|
55
lua/plugins/lazydev.lua
Normal file
55
lua/plugins/lazydev.lua
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua", -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ -- optional blink completion source for require statements and module annotations
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
--version = "1.*",
|
||||||
|
build = "cargo build --release",
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
sources = {
|
||||||
|
-- add lazydev to your completion providers
|
||||||
|
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
|
||||||
|
providers = {
|
||||||
|
lazydev = {
|
||||||
|
name = "LazyDev",
|
||||||
|
module = "lazydev.integrations.blink",
|
||||||
|
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||||
|
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||||
|
-- 'enter' for enter to accept
|
||||||
|
-- 'none' for no mappings
|
||||||
|
--
|
||||||
|
-- All presets have the following mappings:
|
||||||
|
-- C-space: Open menu or open docs if already open
|
||||||
|
-- C-n/C-p or Up/Down: Select next/previous item
|
||||||
|
-- C-e: Hide menu
|
||||||
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||||
|
--
|
||||||
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
|
keymap = { preset = "super-tab" },
|
||||||
|
appearance = { nerd_font_variant = "mono" },
|
||||||
|
completion = {
|
||||||
|
documentation = { auto_show = false },
|
||||||
|
list = { selection = { preselect = false, auto_insert = true } },
|
||||||
|
},
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
ghost_text = { enabled = true },
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
}
|
|
@ -5,9 +5,7 @@ return {
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
|
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
|
||||||
{ "folke/neodev.nvim", opts = {} },
|
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
},
|
},
|
||||||
---@class PluginLspOpts
|
---@class PluginLspOpts
|
||||||
opts = function()
|
opts = function()
|
||||||
|
|
|
@ -3,7 +3,7 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
--"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
ft = { "scala", "sbt" },
|
ft = { "scala", "sbt" },
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -16,7 +16,7 @@ return {
|
||||||
metals_config.on_attach = function(client, bufnr)
|
metals_config.on_attach = function(client, bufnr)
|
||||||
require("metals").setup_dap()
|
require("metals").setup_dap()
|
||||||
end
|
end
|
||||||
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
--metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
-- Debug settings if you're using nvim-dap
|
-- Debug settings if you're using nvim-dap
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
dap.configurations.scala = {
|
dap.configurations.scala = {
|
||||||
|
|
76
lua/plugins/multicursor.lua
Normal file
76
lua/plugins/multicursor.lua
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
return {
|
||||||
|
"jake-stewart/multicursor.nvim",
|
||||||
|
branch = "1.0",
|
||||||
|
config = function()
|
||||||
|
local mc = require("multicursor-nvim")
|
||||||
|
mc.setup()
|
||||||
|
|
||||||
|
local set = vim.keymap.set
|
||||||
|
|
||||||
|
-- Add or skip cursor above/below the main cursor.
|
||||||
|
set({ "n", "x" }, "<leader><up>", function()
|
||||||
|
mc.lineAddCursor(-1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<leader><down>", function()
|
||||||
|
mc.lineAddCursor(1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<leader><leader><up>", function()
|
||||||
|
mc.lineSkipCursor(-1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<leader><leader><down>", function()
|
||||||
|
mc.lineSkipCursor(1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Add or skip adding a new cursor by matching word/selection
|
||||||
|
set({ "n", "x" }, "<C-n>", function()
|
||||||
|
mc.matchAddCursor(1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<C-s>", function()
|
||||||
|
mc.matchSkipCursor(1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<C-S-n>", function()
|
||||||
|
mc.matchAddCursor(-1)
|
||||||
|
end)
|
||||||
|
set({ "n", "x" }, "<C-S-s>", function()
|
||||||
|
mc.matchSkipCursor(-1)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Add and remove cursors with control + left click.
|
||||||
|
set("n", "<c-leftmouse>", mc.handleMouse)
|
||||||
|
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
||||||
|
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
||||||
|
|
||||||
|
-- Disable and enable cursors.
|
||||||
|
set({ "n", "x" }, "<c-q>", mc.toggleCursor)
|
||||||
|
|
||||||
|
-- Mappings defined in a keymap layer only apply when there are
|
||||||
|
-- multiple cursors. This lets you have overlapping mappings.
|
||||||
|
mc.addKeymapLayer(function(layerSet)
|
||||||
|
-- Select a different cursor as the main one.
|
||||||
|
layerSet({ "n", "x" }, "<leader>h", mc.prevCursor)
|
||||||
|
layerSet({ "n", "x" }, "<leader>l", mc.nextCursor)
|
||||||
|
|
||||||
|
-- Delete the main cursor.
|
||||||
|
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
|
||||||
|
|
||||||
|
-- Enable and clear cursors using escape.
|
||||||
|
layerSet("n", "<esc>", function()
|
||||||
|
if not mc.cursorsEnabled() then
|
||||||
|
mc.enableCursors()
|
||||||
|
else
|
||||||
|
mc.clearCursors()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Customize how cursors look.
|
||||||
|
local hl = vim.api.nvim_set_hl
|
||||||
|
hl(0, "MultiCursorCursor", { reverse = true })
|
||||||
|
hl(0, "MultiCursorVisual", { link = "Visual" })
|
||||||
|
hl(0, "MultiCursorSign", { link = "SignColumn" })
|
||||||
|
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
||||||
|
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
||||||
|
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
||||||
|
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
|
||||||
|
end,
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue