feat: new setup using fewer plugins, more reliant on snacks, better completions #1
@@ -19,12 +19,23 @@ M.on_attach = function(client, bufnr)
|
||||
|
||||
opts.desc = "Go to previous diagnostic"
|
||||
keymap.set("n", "[d", function()
|
||||
vim.diagnostic.jump({ count = -1 })
|
||||
vim.diagnostic.jump({
|
||||
count = -1,
|
||||
on_jump = function()
|
||||
vim.diagnostic.open_float()
|
||||
end,
|
||||
})
|
||||
end, opts)
|
||||
keymap.set("n", "<leader>?", vim.diagnostic.open_float, opts)
|
||||
|
||||
opts.desc = "Go to next diagnostic"
|
||||
keymap.set("n", "]d", function()
|
||||
vim.diagnostic.jump({ count = 1 })
|
||||
vim.diagnostic.jump({
|
||||
count = 1,
|
||||
on_jump = function()
|
||||
vim.diagnostic.open_float()
|
||||
end,
|
||||
})
|
||||
end, opts)
|
||||
|
||||
opts.desc = "Show documentation for what is under cursor"
|
||||
|
||||
@@ -6,7 +6,7 @@ local lsp = vim.lsp
|
||||
local capabilities = require("lsp-options").capabilities
|
||||
local on_attach = require("lsp-options").on_attach
|
||||
|
||||
lsp.config("sqlls", {
|
||||
lsp.config("postgres_lsp", {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
@@ -14,4 +14,4 @@ lsp.config("sqlls", {
|
||||
|
||||
-- ── Enable configs ───────────────────────────────────────────────
|
||||
local enable = vim.lsp.enable
|
||||
enable("sqlls")
|
||||
enable("postgres_lsp")
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
return {
|
||||
---------- for lsp diagnostic lines ----------
|
||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
event = "LspAttach",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
vim.diagnostic.config({ virtual_lines = false })
|
||||
|
||||
local lsplines = false
|
||||
vim.keymap.set("n", "<Leader>L", function()
|
||||
lsplines = not lsplines
|
||||
vim.diagnostic.config({ virtual_text = not lsplines })
|
||||
vim.diagnostic.config({ virtual_lines = lsplines })
|
||||
end, { desc = "Toggle lsp_lines" })
|
||||
end,
|
||||
}
|
||||
@@ -40,10 +40,10 @@ return {
|
||||
"jsonls",
|
||||
"marksman",
|
||||
"lua_ls",
|
||||
"postgres_lsp",
|
||||
"pyright",
|
||||
"rust_analyzer",
|
||||
"ruby_lsp",
|
||||
"sqlls",
|
||||
"verible",
|
||||
"vtsls",
|
||||
"vue_ls",
|
||||
|
||||
Reference in New Issue
Block a user