Skip to content
Snippets Groups Projects
Verified Commit 6f5b485f authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

feat: tinymist lsp config and replacing pylsp with basedpyright

parent def8f81d
No related branches found
No related tags found
No related merge requests found
......@@ -169,9 +169,32 @@ return { -- LSP Configuration & Plugins
local servers = {
clangd = {},
gopls = {},
pylsp = {},
basedpyright = {},
rust_analyzer = {},
marksman = {},
tinymist = {
on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = true
if client.server_capabilities.documentFormattingProvider then
-- Set up an autocommand to format on save
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ async = false }) -- Synchronous formatting
end,
})
end
end,
capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()),
-- offset_encoding = "utf-8",
settings = {
exportPdf = "onSave",
outputPath = "$root/target/$dir/$name",
formatterMode = "typstfmt",
formatterPrintWidth = 80,
}
},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
......@@ -209,14 +232,20 @@ return { -- LSP Configuration & Plugins
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'bashls',
'clangd',
'docker_compose_language_service',
'dockerls',
'gopls',
'intelephense',
'lua_ls',
'marksman',
'pylsp',
'rust-analyzer',
'basedpyright',
'rust_analyzer',
'stylua',
'tinymist',
'ts_ls',
'zls',
'stylua', -- Used to format Lua code
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment