Add more language server support
This commit is contained in:
parent
afafebd2ad
commit
43282629a8
54
init.lua
54
init.lua
|
|
@ -40,11 +40,55 @@ require('mini.statusline').setup()
|
||||||
|
|
||||||
-- LSP Configuration
|
-- LSP Configuration
|
||||||
require('lsp-zero')
|
require('lsp-zero')
|
||||||
require('lspconfig').lua_ls.setup({})
|
local lspconfig = require('lspconfig')
|
||||||
require('lspconfig').bashls.setup({})
|
lspconfig.lua_ls.setup({})
|
||||||
require('lspconfig').clangd.setup({})
|
lspconfig.bashls.setup({})
|
||||||
require('lspconfig').tsserver.setup({})
|
lspconfig.clangd.setup({})
|
||||||
require('lspconfig').jedi_language_server.setup({})
|
lspconfig.tsserver.setup({})
|
||||||
|
lspconfig.jedi_language_server.setup({})
|
||||||
|
lspconfig.yamlls.setup({
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
schemas = {
|
||||||
|
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
||||||
|
["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook"] = "**/*playbook*.yaml",
|
||||||
|
["https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/inventory.json"] = "**/*hosts*.yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
lspconfig.emmet_language_server.setup({
|
||||||
|
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "pug", "typescriptreact" },
|
||||||
|
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
|
||||||
|
-- **Note:** only the options listed in the table are supported.
|
||||||
|
init_options = {
|
||||||
|
---@type table<string, string>
|
||||||
|
includeLanguages = {},
|
||||||
|
--- @type string[]
|
||||||
|
excludeLanguages = {},
|
||||||
|
--- @type string[]
|
||||||
|
extensionsPath = {},
|
||||||
|
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/preferences/)
|
||||||
|
preferences = {},
|
||||||
|
--- @type boolean Defaults to `true`
|
||||||
|
showAbbreviationSuggestions = true,
|
||||||
|
--- @type "always" | "never" Defaults to `"always"`
|
||||||
|
showExpandedAbbreviation = "always",
|
||||||
|
--- @type boolean Defaults to `false`
|
||||||
|
showSuggestionsAsSnippets = false,
|
||||||
|
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/)
|
||||||
|
syntaxProfiles = {},
|
||||||
|
--- @type table<string, string> [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables)
|
||||||
|
variables = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
--Enable (broadcasting) snippet capability for completion
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
lspconfig.cssls.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
|
lspconfig.nixd.setup({})
|
||||||
|
|
||||||
-- DAP Configuration
|
-- DAP Configuration
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue