summaryrefslogtreecommitdiffstats
path: root/home-configuration/config/nvim/lua/plugins/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'home-configuration/config/nvim/lua/plugins/lsp')
-rwxr-xr-xhome-configuration/config/nvim/lua/plugins/lsp/init.lua68
1 files changed, 58 insertions, 10 deletions
diff --git a/home-configuration/config/nvim/lua/plugins/lsp/init.lua b/home-configuration/config/nvim/lua/plugins/lsp/init.lua
index c5245d9..e21fba2 100755
--- a/home-configuration/config/nvim/lua/plugins/lsp/init.lua
+++ b/home-configuration/config/nvim/lua/plugins/lsp/init.lua
@@ -69,7 +69,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
})
end
- local excluded_filetypes = { php = true, c = true, cpp = true }
+ local excluded_filetypes = { php = true, c = true, cpp = true, haskell = true, lhaskell = true }
if not client:supports_method('textDocument/willSaveWaitUntil')
and client:supports_method('textDocument/formatting')
and not excluded_filetypes[vim.bo[buf].filetype]
@@ -151,6 +151,21 @@ vim.lsp.config['luals'] = {
},
}
+vim.lsp.config['html'] = {
+ cmd = { 'vscode-html-language-server', '--stdio' },
+ filetypes = { 'html' },
+ root_markers = { 'package.json', '.git' },
+ capabilities = caps,
+ init_options = {
+ provideFormatter = true,
+ },
+ settings = {
+ html = {
+ validate = { scripts = true, styles = true },
+ },
+ },
+}
+
vim.lsp.config['cssls'] = {
cmd = { 'vscode-css-language-server', '--stdio' },
filetypes = { 'css', 'scss', 'less' },
@@ -163,6 +178,46 @@ vim.lsp.config['cssls'] = {
},
}
+vim.lsp.config['eslint'] = {
+ cmd = { 'vscode-eslint-language-server', '--stdio' },
+ filetypes = {
+ 'javascript', 'javascriptreact', 'javascript.jsx',
+ 'typescript', 'typescriptreact', 'typescript.tsx',
+ 'vue', 'svelte', 'astro', 'html',
+ },
+ root_markers = {
+ 'eslint.config.js', 'eslint.config.mjs', 'eslint.config.cjs',
+ '.eslintrc.js', '.eslintrc.json', '.eslintrc',
+ 'package.json', '.git',
+ },
+ capabilities = caps,
+ settings = {
+ validate = 'on',
+ packageManager = 'npm',
+ workingDirectory = { mode = 'auto' },
+ },
+}
+
+vim.lsp.config['jsonls'] = {
+ cmd = { 'vscode-json-language-server', '--stdio' },
+ filetypes = { 'json', 'jsonc' },
+ root_markers = { 'package.json', '.git', 'config.jsonc' },
+ capabilities = caps,
+ settings = {
+ json = {
+ validate = { enable = true },
+ format = { enable = true },
+ },
+ },
+}
+
+vim.lsp.config['markdown'] = {
+ cmd = { 'vscode-markdown-language-server', '--stdio' },
+ filetypes = { 'markdown' },
+ root_markers = { '.git' },
+ capabilities = caps,
+}
+
vim.lsp.config['phpls'] = {
cmd = { 'intelephense', '--stdio' },
filetypes = { 'php' },
@@ -248,21 +303,14 @@ vim.lsp.config['serve_d'] = {
capabilities = caps,
}
-vim.lsp.config['jsonls'] = {
- cmd = { 'vscode-json-languageserver', '--stdio' },
- filetypes = { 'json', 'jsonc' },
- root_markers = { 'package.json', '.git', 'config.jsonc' },
- capabilities = caps,
-}
-
vim.lsp.config['hls'] = {
cmd = { 'haskell-language-server-wrapper', '--lsp' },
filetypes = { 'haskell', 'lhaskell' },
- root_markers = { 'stack.yaml', 'cabal.project', 'package.yaml', '*.cabal', 'hie.yaml', '.git' },
+ root_markers = { 'stack.yaml', 'cabal.project', 'package.yaml', 'hie.yaml', '.git' },
capabilities = caps,
settings = {
haskell = {
- formattingProvider = 'fourmolu',
+ formattingProvider = 'ormolu',
plugin = { semanticTokens = { globalOn = false } },
},
},