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