Compare commits
2 Commits
4b212bf384
...
a6e93a6d76
Author | SHA1 | Date | |
---|---|---|---|
a6e93a6d76 | |||
0cdaba658f |
@ -5,23 +5,20 @@
|
|||||||
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
|
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
|
||||||
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" },
|
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
|
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
|
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" },
|
"gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" },
|
||||||
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "2c1e776fd28f001438f12b1d9cee8933a0a40934" },
|
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
|
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
|
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "f0cd12f7a8a310c58cecebddb6b219ffad1cfd0f" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "f0cd12f7a8a310c58cecebddb6b219ffad1cfd0f" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
|
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "be8d4d4cab6c13c6a572269c9d6a63774baba9a0" },
|
"neodev.nvim": { "branch": "main", "commit": "be8d4d4cab6c13c6a572269c9d6a63774baba9a0" },
|
||||||
"neogit": { "branch": "master", "commit": "93bf00cd5db1e88ea0ca9105e83f7e97896a7cd2" },
|
"neogit": { "branch": "master", "commit": "760d6d74c328ce2a38b02677bf5161999b992da2" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
|
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" },
|
"nvim-dap": { "branch": "master", "commit": "debd7c2f80eaf20c5f5df25db8d8c1b9b18f4421" },
|
||||||
|
@ -56,7 +56,6 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "valeth.plugins" },
|
{ import = "valeth.plugins" },
|
||||||
{ import = "valeth.plugins.lsp" },
|
|
||||||
{ import = "valeth.plugins.dap" },
|
{ import = "valeth.plugins.dap" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -3,39 +3,44 @@ local spec = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spec.dependencies = {
|
spec.dependencies = {
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"onsails/lspkind.nvim",
|
"onsails/lspkind.nvim",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"L3MON4D3/LuaSnip", -- just here so snippets returned from LSP servers don't throw errors
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.event = "LspAttach"
|
|
||||||
|
|
||||||
spec.config = function()
|
spec.config = function()
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local lspk = require("lspkind")
|
local lspk = require("lspkind")
|
||||||
|
|
||||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup({
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspk.cmp_format({
|
format = lspk.cmp_format({
|
||||||
mode = "symbol_text",
|
mode = "symbol_text",
|
||||||
}),
|
})
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered()
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
|
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
|
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<Tab>"] = nil,
|
},
|
||||||
["<S-Tab>"] = nil,
|
sources = cmp.config.sources({
|
||||||
}
|
{ name = "nvim_lsp" },
|
||||||
}
|
{ name = "path" },
|
||||||
|
})
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return spec
|
return spec
|
@ -3,19 +3,53 @@ local spec = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spec.dependencies = {
|
spec.dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
"folke/neodev.nvim",
|
"folke/neodev.nvim",
|
||||||
|
"mhartington/formatter.nvim",
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.config = function()
|
spec.config = function()
|
||||||
|
-- Give me fancy diagnostic signs
|
||||||
|
vim.fn.sign_define("DiagnosticSignError ", { text = "✘" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignWarn" , { text = "▲" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignInfo ", { text = "»" })
|
||||||
|
vim.fn.sign_define("DiagnosticSignHint", { text = "⚑" })
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
local mason = require("mason")
|
||||||
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
|
|
||||||
|
mason.setup({
|
||||||
|
ui = {
|
||||||
|
icons = {
|
||||||
|
package_installed = "✓",
|
||||||
|
package_pending = "➜",
|
||||||
|
package_uninstalled = "✗"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
"rust_analyzer",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
local lsp_config = require("lspconfig")
|
local lsp_config = require("lspconfig")
|
||||||
local tsb = require("telescope.builtin")
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
local autogroup = vim.api.nvim_create_augroup
|
local autogroup = vim.api.nvim_create_augroup
|
||||||
|
|
||||||
|
|
||||||
autocmd("LspAttach", {
|
autocmd("LspAttach", {
|
||||||
group = autogroup("LspAttachConfig", {}),
|
group = autogroup("LspAttachConfig", {}),
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
|
local tsb = require("telescope.builtin")
|
||||||
local opts = { buffer = event.buf, remap = false }
|
local opts = { buffer = event.buf, remap = false }
|
||||||
|
|
||||||
vim.keymap.set("n", "gd", tsb.lsp_definitions, opts)
|
vim.keymap.set("n", "gd", tsb.lsp_definitions, opts)
|
||||||
@ -34,17 +68,19 @@ spec.config = function()
|
|||||||
|
|
||||||
require("neodev").setup()
|
require("neodev").setup()
|
||||||
|
|
||||||
lsp_config.lua_ls.setup {
|
lsp_config.lua_ls.setup({
|
||||||
settings = {
|
capabilities = {
|
||||||
Lua = {
|
textDocument = {
|
||||||
completion = {
|
completion = {
|
||||||
callSnippet = "Replace"
|
completionItem = {
|
||||||
|
snippetSupport = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
lsp_config.rust_analyzer.setup {
|
lsp_config.rust_analyzer.setup({
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
cargo = {
|
cargo = {
|
||||||
@ -56,7 +92,7 @@ spec.config = function()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return spec
|
return spec
|
@ -1,39 +0,0 @@
|
|||||||
-- TODO: figure out how to configure auto formatting and drop lsp-zero
|
|
||||||
local spec = {
|
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
|
||||||
branch = "v2.x",
|
|
||||||
}
|
|
||||||
|
|
||||||
spec.dependencies = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
"mhartington/formatter.nvim",
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
}
|
|
||||||
|
|
||||||
spec.config = function()
|
|
||||||
local lsp_zero = require("lsp-zero").preset({})
|
|
||||||
|
|
||||||
-- NOTE: Format on save does not support async formatting
|
|
||||||
lsp_zero.format_on_save({
|
|
||||||
servers = {
|
|
||||||
["rust_analyzer"] = { "rust" }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
lsp_zero.setup()
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Gimme pretty icons
|
|
||||||
lsp_zero.set_sign_icons({
|
|
||||||
error = '✘',
|
|
||||||
warn = '▲',
|
|
||||||
hint = '⚑',
|
|
||||||
info = '»'
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return spec
|
|
@ -1,32 +0,0 @@
|
|||||||
local spec = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
}
|
|
||||||
|
|
||||||
spec.dependencies = {
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
}
|
|
||||||
|
|
||||||
spec.config = function()
|
|
||||||
local mason = require("mason")
|
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
|
||||||
|
|
||||||
mason.setup({
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
|
||||||
ensure_installed = {
|
|
||||||
"lua_ls",
|
|
||||||
"rust_analyzer",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return spec
|
|
@ -4,7 +4,7 @@ local spec = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spec.dependencies = {
|
spec.dependencies = {
|
||||||
"lewis6991/gitsigns.nvim",
|
{ "lewis6991/gitsigns.nvim", opts = {}},
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.config = function()
|
spec.config = function()
|
||||||
|
@ -23,9 +23,9 @@ spec.config = function()
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
ufo.setup {
|
ufo.setup({
|
||||||
close_fold_kinds = {"comment", "imports"},
|
close_fold_kinds = {"comment", "imports"},
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return spec
|
return spec
|
Loading…
Reference in New Issue
Block a user