diff --git a/lua/lsp_settings.lua b/lua/lsp_settings.lua index 836f7ba..df19941 100644 --- a/lua/lsp_settings.lua +++ b/lua/lsp_settings.lua @@ -67,6 +67,34 @@ require('mason-lspconfig').setup_handlers { }, } } + require("lspconfig")['tsserver'].setup { + on_attach = on_attach, + flags = lsp_flags, + capabilities = capabilities, + settings = { + typescript = { + format = { + insertSpaceAfterOpeningAndBeforeClosingEmptyBraces = false, + insertSpaceAfterFunctionKeywordForAnonymousFunctions = true, + semicolons = 'remove', + }, + }, + }, + } + require("lspconfig")['pylsp'].setup { + on_attach = on_attach, + flags = lsp_flags, + capabilities = capabilities, + settings = { + pylsp = { + plugins = { + pycodestyle = { + maxLineLength = 120 + } + } + } + } + } require("lspconfig")['gopls'].setup { on_attach = on_attach, flags = lsp_flags, diff --git a/lua/plugins.lua b/lua/plugins.lua index 7eaee4a..64dc85d 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -33,6 +33,31 @@ return { dependencies = { 'nvim-lua/plenary.nvim' }, }, + { + 'MunifTanjim/prettier.nvim', + config = function() + local prettier = require("prettier") + + prettier.setup({ + bin = 'prettierd', -- or `'prettierd'` (v0.23.3+) + filetypes = { + "css", + "graphql", + "html", + "javascript", + "javascriptreact", + "json", + "less", + "markdown", + "scss", + "typescript", + "typescriptreact", + "yaml", + }, + }) + end + }, + { 'simrat39/rust-tools.nvim', config = function()