mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
chore: Improve formatting
This commit is contained in:
parent
98e88cd6a7
commit
e236ab2dae
@ -245,21 +245,25 @@ in
|
||||
config = /* lua */ ''
|
||||
local lspconfig = require('lspconfig')
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
lspconfig.denols.setup {
|
||||
capabilities = capabilities,
|
||||
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
capabilities = capabilities,
|
||||
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||
single_file_support = false
|
||||
}
|
||||
|
||||
lspconfig.typst_lsp.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
exportPdf = "onSave"
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
@ -269,20 +273,25 @@ in
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
lspconfig.tailwindcss.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
require("tailwindcss-colors").buf_attach(bufnr)
|
||||
end
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
|
Loading…
Reference in New Issue
Block a user