feat(typst-lsp): added

This commit is contained in:
u2515h
2024-01-14 16:34:26 +01:00
parent 274c74b03a
commit 9fadb93168
3 changed files with 41 additions and 6 deletions

View File

@@ -125,5 +125,28 @@ vim.api.nvim_create_autocmd('LspAttach', {
function() vim.lsp.buf.format {async = true} end, opts)
end
})
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
-- deps.typst-lsp_path
lspconfig.typst_lsp.setup {
cmd = {(deps["typst-lsp_path"] .. "/bin/typst-lsp")},
settings = {
exportPdf = "onType", -- Choose onType, onSave or never.
serverPath = (deps["typst-lsp_path"] .. "/bin/typst-lsp"), -- Normally, there is no need to uncomment it.
}
}
lspconfig.nil_ls.setup {
cmd = {(deps.nil_path .. "/bin/nil")},
-- https://github.com/oxalica/nil/blob/main/docs/configuration.md
settings = {
command = {
formatting = "nixpkgs-fmt", },
},
flake = {
autoArchive = true,
autoEvalInputs = true,
},
}
require("lsp-inlayhints").setup()
require("completion")