Compare commits
1 commit
fc70aa6d49
...
2f6af67f85
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f6af67f85 |
10 changed files with 48 additions and 58 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
|
||||||
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "bf77caa5da671f5bab16e4792711d5aa288e8db0" },
|
"gitsigns.nvim": { "branch": "main", "commit": "bf77caa5da671f5bab16e4792711d5aa288e8db0" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
|
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
bashls = {},
|
bashls = {},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
clangd = {
|
clangd = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
gopls = {},
|
gopls = {},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
pylsp = {},
|
pylsp = {},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
racket_langserver = {},
|
racket_langserver = {},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
texlab = {},
|
texlab = {},
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
my_servers = {
|
my_servers = {
|
||||||
tinymist = {
|
tinymist = {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,21 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
"SmiteshP/nvim-navic",
|
"SmiteshP/nvim-navic",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
-- Servers configured in my_servers will be automatically configured
|
-- Servers configured in my_servers will automatically have
|
||||||
|
-- require("lspconfig")[server].setup(server_opts) called on them
|
||||||
my_servers = {},
|
my_servers = {},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local lspconfig = require("lspconfig")
|
local lsp_zero = require("lsp-zero")
|
||||||
|
|
||||||
-- configure keybinds + navic at attach time
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
callback = function(args)
|
|
||||||
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
|
||||||
|
|
||||||
|
-- enable lsp-zero
|
||||||
|
lsp_zero.on_attach(function(client, buffnr)
|
||||||
-- set lsp keybinds
|
-- set lsp keybinds
|
||||||
-- NOTE: this check is needed since crates.nvim will overwrite "K"
|
-- NOTE: this check is needed since crates.nvim will overwrite "K"
|
||||||
if not vim.fn.mapcheck("K", "n") then
|
if not vim.fn.mapcheck("K", "n") then
|
||||||
|
|
@ -40,21 +39,16 @@ return {
|
||||||
|
|
||||||
-- Use navic for context hints
|
-- Use navic for context hints
|
||||||
if client.supports_method("textDocument/documentSymbol") then
|
if client.supports_method("textDocument/documentSymbol") then
|
||||||
require("nvim-navic").attach(client, args.buf)
|
require("nvim-navic").attach(client, buffnr)
|
||||||
end
|
end
|
||||||
end,
|
end)
|
||||||
})
|
|
||||||
|
|
||||||
-- use pretty icons instead of 'W', 'E', ...
|
-- use pretty icons instead of 'W', 'E', ...
|
||||||
vim.diagnostic.config({
|
lsp_zero.set_sign_icons({
|
||||||
signs = {
|
error = '✘',
|
||||||
text = {
|
warn = '▲',
|
||||||
[vim.diagnostic.severity.ERROR] = '✘',
|
hint = '⚑',
|
||||||
[vim.diagnostic.severity.WARN] = '▲',
|
info = '»'
|
||||||
[vim.diagnostic.severity.HINT] = '⚑',
|
|
||||||
[vim.diagnostic.severity.INFO] = '»',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- disable LSP logging
|
-- disable LSP logging
|
||||||
|
|
@ -64,7 +58,7 @@ return {
|
||||||
local servers = opts.my_servers
|
local servers = opts.my_servers
|
||||||
for server, server_opts in pairs(servers) do
|
for server, server_opts in pairs(servers) do
|
||||||
vim.lsp.config(server, server_opts)
|
vim.lsp.config(server, server_opts)
|
||||||
vim.lsp.enable(server)
|
vim.lsp.enable({ server })
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
@ -128,8 +122,6 @@ return {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
mapping = {
|
mapping = {
|
||||||
["<Up>"] = cmp.mapping.select_prev_item({}, {'i'}),
|
|
||||||
["<Down>"] = cmp.mapping.select_next_item({}, {'i'}),
|
|
||||||
-- Use "Enter" for auto completion
|
-- Use "Enter" for auto completion
|
||||||
["<cr>"] = cmp.mapping.confirm({select = false}),
|
["<cr>"] = cmp.mapping.confirm({select = false}),
|
||||||
["<Tab>"] = tab_mapping,
|
["<Tab>"] = tab_mapping,
|
||||||
|
|
@ -164,9 +156,6 @@ return {
|
||||||
event = "LspAttach",
|
event = "LspAttach",
|
||||||
opts = {
|
opts = {
|
||||||
scope = "line",
|
scope = "line",
|
||||||
|
|
||||||
-- don't show diagnostics in insert mode
|
|
||||||
toggle_event = { "InsertEnter" },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue