Public Access
update - more lsp stuff
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
|
||||||
"catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
|
"catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
|
||||||
@@ -8,6 +12,7 @@
|
|||||||
"none-ls-extras.nvim": { "branch": "main", "commit": "f0746bf4f1a21d6e1d2002f671fb9b46d2146de7" },
|
"none-ls-extras.nvim": { "branch": "main", "commit": "f0746bf4f1a21d6e1d2002f671fb9b46d2146de7" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "0d42ba8d506242b2252d2d2885a7f6f4f5b2bcb2" },
|
"none-ls.nvim": { "branch": "main", "commit": "0d42ba8d506242b2252d2d2885a7f6f4f5b2bcb2" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" },
|
"nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "a2d6678bb21052013d0dd7cb35dffbac13846c98" },
|
"nvim-treesitter": { "branch": "master", "commit": "a2d6678bb21052013d0dd7cb35dffbac13846c98" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "e2e3475c7bffbafbda19df2be6ffd04f6d1a3e16" },
|
"nvim-web-devicons": { "branch": "master", "commit": "e2e3475c7bffbafbda19df2be6ffd04f6d1a3e16" },
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
dependencies = {
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
}, {
|
||||||
|
{ name = "buffer" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -16,13 +16,26 @@ return {
|
|||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
config = function()
|
config = function()
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig.lua_ls.setup({})
|
lspconfig.lua_ls.setup({
|
||||||
lspconfig.tsserver.setup({})
|
capabilities = capabilities
|
||||||
lspconfig.svelte.setup({})
|
})
|
||||||
lspconfig.tailwindcss.setup({})
|
lspconfig.tsserver.setup({
|
||||||
lspconfig.cssls.setup({})
|
capabilities = capabilities
|
||||||
lspconfig.rust_analyzer.setup({})
|
})
|
||||||
|
lspconfig.svelte.setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
|
lspconfig.tailwindcss.setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
|
lspconfig.cssls.setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
|
lspconfig.rust_analyzer.setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
|
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
|
||||||
|
|||||||
Reference in New Issue
Block a user