Fix mixed indent in neovim plugins config
This commit is contained in:
parent
cca0aa30f5
commit
ea5ef431c4
|
@ -16,7 +16,7 @@ lua <<EOF
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
-- Attach `completion-nvim` to the buffer.
|
-- Attach `completion-nvim` to the buffer.
|
||||||
local function lsp_setup()
|
local function lsp_setup()
|
||||||
require('completion').on_attach()
|
require('completion').on_attach()
|
||||||
end
|
end
|
||||||
|
|
||||||
for lsp_key, lsp_settings in pairs({
|
for lsp_key, lsp_settings in pairs({
|
||||||
|
@ -25,65 +25,65 @@ lua <<EOF
|
||||||
'cssls', -------------------------------- CSS / SCSS / LESS
|
'cssls', -------------------------------- CSS / SCSS / LESS
|
||||||
'dockerls', ----------------------------- Docker
|
'dockerls', ----------------------------- Docker
|
||||||
['gopls'] = { --------------------------- Go
|
['gopls'] = { --------------------------- Go
|
||||||
['settings'] = {
|
['settings'] = {
|
||||||
['gopls'] = {
|
['gopls'] = {
|
||||||
['analyses'] = {
|
['analyses'] = {
|
||||||
['unusedparams'] = true,
|
['unusedparams'] = true,
|
||||||
},
|
},
|
||||||
['staticcheck'] = true
|
['staticcheck'] = true
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'html', --------------------------------- HTML
|
'html', --------------------------------- HTML
|
||||||
['jdtls'] = { --------------------------- Java
|
['jdtls'] = { --------------------------- Java
|
||||||
['root_dir'] = nvim_lsp.util.root_pattern('.git', 'pom.xml', 'build.xml'),
|
['root_dir'] = nvim_lsp.util.root_pattern('.git', 'pom.xml', 'build.xml'),
|
||||||
['init_options'] = {
|
['init_options'] = {
|
||||||
['jvm_args'] = {['java.format.settings.url'] = vim.fn.stdpath('config')..'/eclipse-formatter.xml'},
|
['jvm_args'] = {['java.format.settings.url'] = vim.fn.stdpath('config')..'/eclipse-formatter.xml'},
|
||||||
['workspace'] = vim.fn.stdpath('cache')..'/java-workspaces'
|
['workspace'] = vim.fn.stdpath('cache')..'/java-workspaces'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'jsonls', ------------------------------- JSON
|
'jsonls', ------------------------------- JSON
|
||||||
|
'phpactor', ----------------------------- PHP
|
||||||
'pyls', --------------------------------- Python
|
'pyls', --------------------------------- Python
|
||||||
'rnix', --------------------------------- Nix
|
'rnix', --------------------------------- Nix
|
||||||
'solargraph', --------------------------- Ruby
|
'solargraph', --------------------------- Ruby
|
||||||
'rust_analyzer', ------------------------ Rust
|
'rust_analyzer', ------------------------ Rust
|
||||||
['sqlls'] = {
|
['sqlls'] = {
|
||||||
['cmd'] = {"$XDG_DATA_HOME/nvm/versions/node/v12.19.0/bin/sql-language-server", "up", "--method", "stdio"}
|
['cmd'] = {"$XDG_DATA_HOME/nvm/versions/node/v12.19.0/bin/sql-language-server", "up", "--method", "stdio"}
|
||||||
},
|
},
|
||||||
['terraformls'] = { --------------------- Terraform
|
['terraformls'] = { --------------------- Terraform
|
||||||
['filetypes'] = { "terraform", "hcl", "tf" }
|
['filetypes'] = { "terraform", "hcl", "tf" }
|
||||||
},
|
},
|
||||||
'tsserver', ----------------------------- Typescript / JavaScript
|
'tsserver', ----------------------------- Typescript / JavaScript
|
||||||
'angularls', ---------------------------- Angular
|
'angularls', ---------------------------- Angular
|
||||||
'vuels', -------------------------------- Vue
|
'vuels', -------------------------------- Vue
|
||||||
'svelte', ------------------------------- Svelte
|
'svelte', ------------------------------- Svelte
|
||||||
['yamlls'] = { -------------------------- YAML
|
['yamlls'] = { -------------------------- YAML
|
||||||
['settings'] = {
|
['settings'] = {
|
||||||
['yaml'] = {
|
['yaml'] = {
|
||||||
['schemas'] = {
|
['schemas'] = {
|
||||||
['https://json.schemastore.org/github-workflow'] = '.github/workflows/*.{yml,yaml}',
|
['https://json.schemastore.org/github-workflow'] = '.github/workflows/*.{yml,yaml}',
|
||||||
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
|
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
|
||||||
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
|
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
|
||||||
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
|
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}) do -- Setup all of the language servers. †
|
}) do -- Setup all of the language servers. †
|
||||||
if type(lsp_key) == 'number' then -- Enable the LSP with defaults.
|
if type(lsp_key) == 'number' then -- Enable the LSP with defaults.
|
||||||
-- The `lsp` is an index in this case.
|
-- The `lsp` is an index in this case.
|
||||||
nvim_lsp[lsp_settings].setup{['on_attach'] = lsp_setup}
|
nvim_lsp[lsp_settings].setup{['on_attach'] = lsp_setup}
|
||||||
else -- Use the LSP's configuration.
|
else -- Use the LSP's configuration.
|
||||||
local on_attach_setting = lsp_settings.on_attach
|
local on_attach_setting = lsp_settings.on_attach
|
||||||
|
|
||||||
lsp_settings.on_attach = function()
|
lsp_settings.on_attach = function()
|
||||||
lsp_setup()
|
lsp_setup()
|
||||||
if on_attach_setting then on_attach_setting() end
|
if on_attach_setting then on_attach_setting() end
|
||||||
end
|
end
|
||||||
|
|
||||||
nvim_lsp[lsp_key].setup(lsp_settings)
|
nvim_lsp[lsp_key].setup(lsp_settings)
|
||||||
end
|
end
|
||||||
end -- ‡
|
end -- ‡
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue