Restructuring
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"npm",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"sh",
|
||||
},
|
||||
cmd = { "bash-language-server", "start", },
|
||||
cmd_env = { GLOB_PATTERN = "*@(.sh|.inc|.bash|.command)", },
|
||||
single_file_support = true,
|
||||
},
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
"objc",
|
||||
"objcpp",
|
||||
"cuda",
|
||||
"proto",
|
||||
},
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--clang-tidy",
|
||||
"--enable-config",
|
||||
"--log=verbose",
|
||||
},
|
||||
single_file_support = true,
|
||||
},
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"python3",
|
||||
},
|
||||
py_module_deps = {
|
||||
"venv",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"cmake",
|
||||
},
|
||||
cmd = { "cmake-language-server", },
|
||||
single_file_support = true,
|
||||
init_options = {
|
||||
buildDirectory = "build",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
-- For more info see:
|
||||
-- https://github.com/iamcco/diagnostic-languageserver
|
||||
|
||||
-- More examples at:
|
||||
-- https://github.com/iamcco/coc-diagnostic/blob/master/src/config.ts
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"npm",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"python",
|
||||
"sh",
|
||||
"php",
|
||||
},
|
||||
cmd = { "diagnostic-languageserver", "--stdio", },
|
||||
single_file_support = true,
|
||||
init_options = {
|
||||
filetypes = {
|
||||
python = "flake8",
|
||||
php = "phpcs",
|
||||
},
|
||||
linters = {
|
||||
-- some help from this:
|
||||
-- https://github.com/creativenull/diagnosticls-configs-nvim/blob/main/lua/diagnosticls-configs/linters/flake8.lua
|
||||
flake8 = {
|
||||
command = "flake8",
|
||||
args = {
|
||||
"--format",
|
||||
"%(row)d,%(col)d,%(code).1s,%(code)s: %(text)s",
|
||||
"-",
|
||||
},
|
||||
rootPatterns = { "Pipfile", ".git", "tox.ini", },
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
debounce = 100,
|
||||
offsetLine = 0,
|
||||
offsetColumn = 0,
|
||||
sourceName = "flake8",
|
||||
formatLines = 1,
|
||||
formatPattern = {
|
||||
[[^(\d+),(\d+),([A-Z]),(.*): (.*)]],
|
||||
{ line = 1, column = 2, security = 3, message = { 5, }, },
|
||||
},
|
||||
securities = {
|
||||
-- Available securities are { 'error', 'warning', 'hin', 'info' }
|
||||
E = "error",
|
||||
W = "warning",
|
||||
B = "hint",
|
||||
F = "hint",
|
||||
D = "info",
|
||||
},
|
||||
},
|
||||
phpcs = {
|
||||
command = "./vendor/bin/phpcs",
|
||||
args = {
|
||||
"--report=json",
|
||||
"-s",
|
||||
"-",
|
||||
},
|
||||
rootPatterns = {
|
||||
"composer.json",
|
||||
"composer.lock",
|
||||
"vendor",
|
||||
".git",
|
||||
},
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
debounce = 100,
|
||||
offsetLine = 0,
|
||||
offsetColumn = 0,
|
||||
sourceName = "phpcs",
|
||||
|
||||
-- Alternative to JSON parsing,
|
||||
-- requires --report=emacs
|
||||
-- formatLines = 1,
|
||||
-- formatPattern = {
|
||||
-- [[^.*:(\d+):(\d+): (.*) [-] (.*)$]],
|
||||
-- {
|
||||
-- line = 1,
|
||||
-- column = 2,
|
||||
-- security = 3,
|
||||
-- message = { 4, },
|
||||
-- },
|
||||
-- },
|
||||
-- securities = {
|
||||
-- error = "error",
|
||||
-- warning = "warning",
|
||||
-- },
|
||||
|
||||
parseJson = {
|
||||
errorsRoot = "files.STDIN.messages",
|
||||
line = "line",
|
||||
column = "column",
|
||||
security = "type",
|
||||
message = "${message} (${source})",
|
||||
},
|
||||
securities = {
|
||||
ERROR = "error",
|
||||
WARNING = "warning",
|
||||
},
|
||||
},
|
||||
},
|
||||
formatFiletypes = {
|
||||
python = { "black", "isort", },
|
||||
sh = { "shfmt", },
|
||||
},
|
||||
formatters = {
|
||||
black = {
|
||||
sourceName = "black",
|
||||
command = "black",
|
||||
args = {
|
||||
"--stdin-filename",
|
||||
"%filename",
|
||||
"-t",
|
||||
"py39",
|
||||
"--quiet",
|
||||
"-",
|
||||
},
|
||||
rootPatterns = { "Pipfile", ".git", "tox.ini", },
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
ignoreExitCode = false,
|
||||
},
|
||||
isort = {
|
||||
sourceName = "isort",
|
||||
command = "isort",
|
||||
args = { "--quiet", "-", },
|
||||
rootPatterns = { "Pipfile", ".git", "tox.ini", },
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
ignoreExitCode = false,
|
||||
},
|
||||
shfmt = {
|
||||
sourceName = "shfmt",
|
||||
command = "shfmt",
|
||||
args = { "-s", "-i", "4", "-ci", },
|
||||
rootPatterns = { "Pipfile", ".git", "tox.ini", },
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
ignoreExitCode = false,
|
||||
},
|
||||
phpcbf = {
|
||||
command = "./vendor/bin/phpcbf",
|
||||
args = {
|
||||
"--standard=PSR12",
|
||||
"-",
|
||||
},
|
||||
rootPatterns = {
|
||||
"composer.json",
|
||||
"composer.lock",
|
||||
"vendor",
|
||||
".git",
|
||||
},
|
||||
isStdout = true,
|
||||
isStderr = false,
|
||||
ignoreExitCode = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
-- spec: https://github.com/bmewburn/intelephense-docs/blob/master/installation.md
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"npm",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"php",
|
||||
},
|
||||
cmd = { "intelephense", "--stdio", },
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
intelephense = {
|
||||
environment = {
|
||||
phpVersion = "7.4",
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
braces = "psr12",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"python3",
|
||||
},
|
||||
py_module_deps = {
|
||||
"venv",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"python",
|
||||
},
|
||||
cmd = { "jedi-language-server", },
|
||||
single_file_support = true,
|
||||
-- For more info see:
|
||||
-- - https://github.com/pappasam/jedi-language-server#configuration
|
||||
-- - https://github.com/pappasam/coc-jedi#configuration (good descriptions)
|
||||
init_options = {
|
||||
-- Built-in diagnostics seem to be very basic,
|
||||
-- to the point where you are wondering if it's even active.
|
||||
-- Will use flake8 together with diagnosticls for added linting
|
||||
diagnostics = {
|
||||
-- Enables (or disables) diagnostics provided by Jedi
|
||||
-- type: boolean
|
||||
-- default: true
|
||||
enable = true,
|
||||
},
|
||||
-- The preferred MarkupKind for all jedi-language-server messages that take MarkupContent.
|
||||
-- type: string
|
||||
-- accepted values: "markdown", "plaintext"
|
||||
-- If omitted, jedi-language-server defaults to the client-preferred configuration.
|
||||
-- If there is no client-preferred configuration, jedi language server users "plaintext".
|
||||
-- markupKindPreferred = "markdown",
|
||||
workspace = {
|
||||
symbols = {
|
||||
-- Performance optimization that sets names of folders that are ignored for workspace/symbols.
|
||||
-- type: string[]
|
||||
-- default: { ".nox", ".tox", ".venv", "__pycache__", "venv" }
|
||||
-- If you manually set this option, it overrides the default.
|
||||
-- Setting it to an empty array will result in no ignored folders.
|
||||
ignoreFolders = {
|
||||
".nox", ".tox", ".venv", "__pycache__", "venv",
|
||||
"artifacts", "config", ".vscode", ".pytest_cache",
|
||||
"build", "scripts", "incoax_tests.egg-info",
|
||||
"node_modules",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
-- spec: https://github.com/eclipse/lemminx/blob/main/docs/Configuration.md
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"xml",
|
||||
"xsd",
|
||||
"xsl",
|
||||
"xslt",
|
||||
"svg",
|
||||
},
|
||||
cmd = { "lemminx", },
|
||||
single_file_support = true,
|
||||
init_options = {
|
||||
settings = {
|
||||
xml = {
|
||||
format = {
|
||||
enabled = true, -- is able to format document
|
||||
splitAttributes = false, -- each attribute is formatted onto new line
|
||||
joinCDATALines = false, -- normalize content inside CDATA
|
||||
joinCommentLines = false, -- normalize content inside comments
|
||||
formatComments = true, -- keep comment in relative position
|
||||
joinContentLines = false, -- normalize content inside elements
|
||||
spaceBeforeEmptyCloseLine = true, -- insert whitespace before self closing tag end bracket
|
||||
},
|
||||
validation = {
|
||||
noGrammar = "ignore",
|
||||
enabled = true,
|
||||
schema = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
local runtime_path = vim.split(package.path, ";")
|
||||
table.insert(runtime_path, "lua/?.lua")
|
||||
table.insert(runtime_path, "lua/?/init.lua")
|
||||
|
||||
-- spec: https://luals.github.io/wiki/settings/
|
||||
|
||||
return {
|
||||
enabled = true,
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"lua",
|
||||
},
|
||||
cmd = { "lua-language-server", },
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
showWord = "Disable",
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
path = runtime_path,
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
telemetry = { enable = false, },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
-- spec: https://phpactor.readthedocs.io/en/master/reference/configuration.html
|
||||
|
||||
return {
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"php",
|
||||
"composer",
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
"php",
|
||||
},
|
||||
cmd = { "phpactor", "language-server", },
|
||||
single_file_support = true,
|
||||
init_options = {
|
||||
-- using custom php-cs-fixer setup in diagnosticls,
|
||||
-- due to issue when opening file with CRLF
|
||||
-- ["language_server_php_cs_fixer.enabled"] = false,
|
||||
-- ["logging.enabled"] = true,
|
||||
-- ["logging.path"] = "/tmp/application.log",
|
||||
-- ["logging.level"] = "debug",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user