ide features for Typescrript and JavaScript
This commit is contained in:
@@ -14,6 +14,7 @@ return {
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"pyright", -- Python
|
||||
"tsserver", -- TypeScript/JavaScript
|
||||
"jsonls", -- JSON
|
||||
"yamlls", -- YAML
|
||||
"html", -- HTML
|
||||
@@ -41,7 +42,7 @@ return {
|
||||
},
|
||||
})
|
||||
|
||||
-- Other languages
|
||||
-- Python
|
||||
vim.lsp.config("pyright", {
|
||||
settings = {
|
||||
python = {
|
||||
@@ -52,6 +53,36 @@ return {
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Type- and JavaScript
|
||||
vim.lsp.config("tsserver", {
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Other languages
|
||||
vim.lsp.config("jsonls", {})
|
||||
vim.lsp.config("yamlls", {})
|
||||
vim.lsp.config("html", {})
|
||||
@@ -61,6 +92,7 @@ return {
|
||||
-- Enable servers
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("pyright")
|
||||
vim.lsp.enable("tsserver")
|
||||
vim.lsp.enable("jsonls")
|
||||
vim.lsp.enable("yamlls")
|
||||
vim.lsp.enable("html")
|
||||
|
||||
Reference in New Issue
Block a user