diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 3fe35e6..2fa8a0a 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -30,11 +30,6 @@ require'lspconfig'.tsserver.setup({ includeInlayFunctionLikeReturnTypeHints = true, includeInlayEnumMemberValueHints = true, } - }, - ["rust-analyzer"] = { - checkOnSave = { - command = 'clippy' - } } } }) @@ -50,7 +45,41 @@ require'lspconfig'.rust_analyzer.setup { includeInlayPropertyDeclarationTypeHints = true, includeInlayFunctionLikeReturnTypeHints = true, includeInlayEnumMemberValueHints = true, + }, + checkOnSave = { + command = 'clippy' } }, }, } + +require('lspconfig').tailwindcss.setup({ + settings = { + tailwindCSS = { + experimental = { + classRegex = { + { "tv\\((([^()]*|\\([^()]*\\))*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]" } + }, + }, + }, + }, +}) + +require 'lspconfig'.eslint.setup({ + settings = { + packageManager = 'npm' + }, + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + command = "EslintFixAll", + }) + end, +}) + +lspconfig.graphql.setup({ + root_dir = lspconfig.util.root_pattern(".graphqlconfig", ".graphqlrc", "package.json"), + flags = { + debounce_text_changes = 150, + }, +}) diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 5ea688e..91072c4 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -89,6 +89,7 @@ return require('packer').startup(function() } } + use { "nvim-neotest/nvim-nio" } use 'mfussenegger/nvim-dap' use 'mfussenegger/nvim-jdtls' -- Java use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }