From bc5f8b84fcdba6dae35fdacbd2441958344a6bc3 Mon Sep 17 00:00:00 2001 From: abs3nt Date: Sun, 9 Jul 2023 18:09:35 -0700 Subject: [PATCH] updates --- lua/lsp_settings.lua | 28 ++++++++++++++++++++++++++++ lua/plugins.lua | 25 +++++++++++++++++++++++++ 2 files changed, 53 insertions(+) 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()