mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
enc: move lsp config to auto-lsp.nvim
This commit is contained in:
parent
5f766a5717
commit
c09e320633
22 changed files with 253 additions and 293 deletions
12
lua/user/lsp/settings_backup/clangd.lua
Normal file
12
lua/user/lsp/settings_backup/clangd.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
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(),
|
||||
singe_file_support = true,
|
||||
}
|
35
lua/user/lsp/settings_backup/denols.lua
Normal file
35
lua/user/lsp/settings_backup/denols.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
-- add cmd
|
||||
cmd = { "deno", "lsp" },
|
||||
-- add file type support
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
-- add root dir support
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
"package.json",
|
||||
"tsconfig.json",
|
||||
"jsconfig.json",
|
||||
"deno.json",
|
||||
"deno.jsonc",
|
||||
".git"
|
||||
),
|
||||
-- add settings
|
||||
settings = {
|
||||
deno = {
|
||||
enable = true,
|
||||
suggest = {
|
||||
imports = {
|
||||
hosts = {
|
||||
["https://deno.land"] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
24
lua/user/lsp/settings_backup/emmet_ls.lua
Normal file
24
lua/user/lsp/settings_backup/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"),
|
||||
}
|
20
lua/user/lsp/settings_backup/eslint.lua
Normal file
20
lua/user/lsp/settings_backup/eslint.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
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",
|
||||
-- ".eslintrc.json",
|
||||
-- ".eslintrc.js",
|
||||
-- ".eslintrc.cjs"
|
||||
-- ),
|
||||
}
|
6
lua/user/lsp/settings_backup/intelephense.lua
Normal file
6
lua/user/lsp/settings_backup/intelephense.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
cmd = { "intelephense", "--stdio" },
|
||||
filetypes = { "php" },
|
||||
root_dir = require("lspconfig.util").root_pattern("composer.json", ".git") or vim.loop.cwd() or vim.fn.getcwd(),
|
||||
single_file_support = true,
|
||||
}
|
22
lua/user/lsp/settings_backup/jdtls.lua
Normal file
22
lua/user/lsp/settings_backup/jdtls.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
cmd = {
|
||||
"jdtls",
|
||||
"-configuration",
|
||||
vim.fn.stdpath("cache") .. "/jdtls/config",
|
||||
"-data",
|
||||
vim.fn.stdpath("cache") .. "/jdtls/workspace",
|
||||
},
|
||||
filetypes = { "java" },
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
-- Single-module projects
|
||||
{
|
||||
"build.xml", -- Ant
|
||||
"pom.xml", -- Maven
|
||||
"settings.gradle", -- Gradle
|
||||
"settings.gradle.kts", -- Gradle
|
||||
},
|
||||
-- Multi-module projects
|
||||
{ "build.gradle", "build.gradle.kts" }
|
||||
) or vim.fn.getcwd(),
|
||||
singe_file_support = true,
|
||||
}
|
19
lua/user/lsp/settings_backup/jsonls.lua
Normal file
19
lua/user/lsp/settings_backup/jsonls.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line("$"), 0 })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
init_options = {
|
||||
provideFormatter = false,
|
||||
},
|
||||
}
|
15
lua/user/lsp/settings_backup/kotlin_language_server.lua
Normal file
15
lua/user/lsp/settings_backup/kotlin_language_server.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
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"
|
||||
),
|
||||
singe_file_support = true,
|
||||
}
|
41
lua/user/lsp/settings_backup/lua_ls.lua
Normal file
41
lua/user/lsp/settings_backup/lua_ls.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
-- https://luals.github.io/wiki/settings/
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { "vim", "spec" },
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
special = {
|
||||
spec = "require",
|
||||
},
|
||||
},
|
||||
-- workspace = {
|
||||
-- checkThirdParty = false,
|
||||
-- library = {
|
||||
-- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
-- [vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
-- },
|
||||
-- },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
hint = {
|
||||
enable = false,
|
||||
arrayIndex = "Disable", -- "Enable" | "Auto" | "Disable"
|
||||
await = true,
|
||||
paramName = "Disable", -- "All" | "Literal" | "Disable"
|
||||
paramType = true,
|
||||
semicolon = "All", -- "All" | "SameLine" | "Disable"
|
||||
setType = false,
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
9
lua/user/lsp/settings_backup/pyright.lua
Normal file
9
lua/user/lsp/settings_backup/pyright.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = "off",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
8
lua/user/lsp/settings_backup/sqlls.lua
Normal file
8
lua/user/lsp/settings_backup/sqlls.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
-- cmd = { "sql-language-server", "up", "--method", "stdio" },
|
||||
-- filetypes = { "sql", "mysql" },
|
||||
-- -- add root dir support
|
||||
-- root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")
|
||||
-- or vim.loop.cwd()
|
||||
-- or vim.fn.getcwd(),
|
||||
}
|
5
lua/user/lsp/settings_backup/stimulus_ls.lua
Normal file
5
lua/user/lsp/settings_backup/stimulus_ls.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
filetypes = { "blade" },
|
||||
root_dir = require("lspconfig.util").root_pattern("composer.json", ".git") or vim.loop.cwd() or vim.fn.getcwd(),
|
||||
singe_file_support = true,
|
||||
}
|
92
lua/user/lsp/settings_backup/tailwindcss.lua
Normal file
92
lua/user/lsp/settings_backup/tailwindcss.lua
Normal file
|
@ -0,0 +1,92 @@
|
|||
return {
|
||||
-- cmd = { "tailwindcss-language-server", "--stdio" },
|
||||
-- filetypes = {
|
||||
-- "aspnetcorerazor",
|
||||
-- "astro",
|
||||
-- "astro-markdown",
|
||||
-- "blade",
|
||||
-- "clojure",
|
||||
-- "django-html",
|
||||
-- "htmldjango",
|
||||
-- "edge",
|
||||
-- "eelixir",
|
||||
-- "elixir",
|
||||
-- "ejs",
|
||||
-- "erb",
|
||||
-- "eruby",
|
||||
-- "gohtml",
|
||||
-- "gohtmltmpl",
|
||||
-- "haml",
|
||||
-- "handlebars",
|
||||
-- "hbs",
|
||||
-- "html",
|
||||
-- "html-eex",
|
||||
-- "heex",
|
||||
-- "jade",
|
||||
-- "leaf",
|
||||
-- "liquid",
|
||||
-- "markdown",
|
||||
-- "mdx",
|
||||
-- "mustache",
|
||||
-- "njk",
|
||||
-- "nunjucks",
|
||||
-- "php",
|
||||
-- "razor",
|
||||
-- "slim",
|
||||
-- "twig",
|
||||
-- "css",
|
||||
-- "less",
|
||||
-- "postcss",
|
||||
-- "sass",
|
||||
-- "scss",
|
||||
-- "stylus",
|
||||
-- "sugarss",
|
||||
-- "javascript",
|
||||
-- "javascriptreact",
|
||||
-- "reason",
|
||||
-- "rescript",
|
||||
-- "typescript",
|
||||
-- "typescriptreact",
|
||||
-- "vue",
|
||||
-- "svelte",
|
||||
-- "templ",
|
||||
-- },
|
||||
-- -- init options
|
||||
-- init_options = {
|
||||
-- userLanguages = {
|
||||
-- eelixir = "html-eex",
|
||||
-- eruby = "erb",
|
||||
-- templ = "html",
|
||||
-- },
|
||||
-- },
|
||||
-- -- root dir
|
||||
-- root_dir = root_pattern(
|
||||
-- "tailwind.config.js",
|
||||
-- "tailwind.config.cjs",
|
||||
-- "tailwind.config.mjs",
|
||||
-- "tailwind.config.ts",
|
||||
-- "postcss.config.js",
|
||||
-- "postcss.config.cjs",
|
||||
-- "postcss.config.mjs",
|
||||
-- "postcss.config.ts",
|
||||
-- "package.json",
|
||||
-- "node_modules",
|
||||
-- ".git"
|
||||
-- ),
|
||||
-- -- settings
|
||||
-- settings = {
|
||||
-- tailwindCSS = {
|
||||
-- classAttributes = { "class", "className", "class:list", "classList", "ngClass" },
|
||||
-- lint = {
|
||||
-- cssConflict = "warning",
|
||||
-- invalidApply = "error",
|
||||
-- invalidConfigPath = "error",
|
||||
-- invalidScreen = "error",
|
||||
-- invalidTailwindDirective = "error",
|
||||
-- invalidVariant = "error",
|
||||
-- recommendedVariantOrder = "warning",
|
||||
-- },
|
||||
-- validate = true,
|
||||
-- },
|
||||
-- },
|
||||
}
|
18
lua/user/lsp/settings_backup/tsserver.lua
Normal file
18
lua/user/lsp/settings_backup/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",
|
||||
},
|
||||
}
|
25
lua/user/lsp/settings_backup/vuels.lua
Normal file
25
lua/user/lsp/settings_backup/vuels.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local opts = {
|
||||
setup = {
|
||||
root_dir = require("lspconfig.util").root_pattern("package.json", "vue.config.js")
|
||||
or vim.loop.cwd()
|
||||
or vim.fn.getcwd(),
|
||||
init_options = {
|
||||
config = {
|
||||
vetur = {
|
||||
completion = {
|
||||
autoImport = true,
|
||||
tagCasing = "kebab",
|
||||
useScaffoldSnippets = true,
|
||||
},
|
||||
useWorkspaceDependencies = true,
|
||||
validation = {
|
||||
script = true,
|
||||
style = true,
|
||||
template = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return opts
|
16
lua/user/lsp/settings_backup/yamlls.lua
Normal file
16
lua/user/lsp/settings_backup/yamlls.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
local opts = {
|
||||
settings = {
|
||||
yaml = {
|
||||
hover = true,
|
||||
completion = true,
|
||||
validate = true,
|
||||
schemaStore = {
|
||||
enable = true,
|
||||
url = "https://www.schemastore.org/api/json/catalog.json",
|
||||
},
|
||||
schemas = require("schemastore").yaml.schemas(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
Loading…
Add table
Add a link
Reference in a new issue