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 ...@@ -169,9 +169,32 @@ return { -- LSP Configuration & Plugins
local servers = { local servers = {
clangd = {}, clangd = {},
gopls = {}, gopls = {},
pylsp = {}, basedpyright = {},
rust_analyzer = {}, rust_analyzer = {},
marksman = {}, 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 -- ... 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: -- Some languages (like typescript) have entire language plugins that can be useful:
...@@ -209,14 +232,20 @@ return { -- LSP Configuration & Plugins ...@@ -209,14 +232,20 @@ return { -- LSP Configuration & Plugins
-- for you, so that they are available from within Neovim. -- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {}) local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
'bashls',
'clangd', 'clangd',
'docker_compose_language_service',
'dockerls',
'gopls', 'gopls',
'intelephense',
'lua_ls', 'lua_ls',
'marksman', 'marksman',
'pylsp', 'basedpyright',
'rust-analyzer', 'rust_analyzer',
'stylua',
'tinymist',
'ts_ls',
'zls', 'zls',
'stylua', -- Used to format Lua code
}) })
require('mason-tool-installer').setup { ensure_installed = ensure_installed } 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.
Please register or to comment