mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-04 06:24:29 +02:00
add: move config to individual file
This commit is contained in:
parent
554d68c7ae
commit
549a63a3da
9 changed files with 291 additions and 187 deletions
11
lua/user/lsp/settings/clangd.lua
Normal file
11
lua/user/lsp/settings/clangd.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
"build",
|
||||
"compile_commands.json",
|
||||
".git",
|
||||
"mvnw",
|
||||
"gradlew",
|
||||
"pom.xml",
|
||||
"build.gradle"
|
||||
) or vim.loop.cwd() or vim.fn.getcwd(),
|
||||
}
|
24
lua/user/lsp/settings/emmet_ls.lua
Normal file
24
lua/user/lsp/settings/emmet_ls.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
cmd = { "emmet-ls", "-c", "--stdio" },
|
||||
-- add file type support
|
||||
-- filetypes = {
|
||||
-- "javascript",
|
||||
-- "javascriptreact",
|
||||
-- "javascript.jsx",
|
||||
-- "typescript",
|
||||
-- "typescriptreact",
|
||||
-- "typescript.tsx",
|
||||
-- "astro",
|
||||
-- "css",
|
||||
-- "eruby",
|
||||
-- "html",
|
||||
-- "htmldjango",
|
||||
-- "less",
|
||||
-- "pug",
|
||||
-- "sass",
|
||||
-- "scss",
|
||||
-- "svelte",
|
||||
-- "vue" -- },
|
||||
-- add dynamic root dir support
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
|
||||
}
|
13
lua/user/lsp/settings/eslint.lua
Normal file
13
lua/user/lsp/settings/eslint.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
cmd = { "vscode-eslint-language-server", "--stdio" }, -- add file type support
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
-- add dynamic root dir support
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
|
||||
}
|
14
lua/user/lsp/settings/kotlin_language_server.lua
Normal file
14
lua/user/lsp/settings/kotlin_language_server.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
cmd = { "kotlin-language-server" },
|
||||
filetypes = { "kotlin" },
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
"build.gradle.kts",
|
||||
"build.gradle",
|
||||
"settings.gradle",
|
||||
"gradlew",
|
||||
"pom.xml",
|
||||
"build.gradle.kts",
|
||||
"build.kts",
|
||||
".git"
|
||||
),
|
||||
}
|
|
@ -9,7 +9,13 @@ return {
|
|||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
[vim.fn.expand("$VIMRUNTIME")] = true,
|
||||
["${3rd}/busted/library"] = true,
|
||||
["${3rd}/luassert/library"] = true,
|
||||
["${3rd}/luv/library"] = true,
|
||||
},
|
||||
maxPreload = 5000,
|
||||
preloadFileSize = 10000,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
18
lua/user/lsp/settings/tsserver.lua
Normal file
18
lua/user/lsp/settings/tsserver.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
-- add cmd
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
-- add file type support
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
-- add dynamic root dir support
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue