feat(lsp): add lsp configs for inline hints in js and lua files
This commit is contained in:
50
lua/config/plugins/lsp_config.lua
Normal file
50
lua/config/plugins/lsp_config.lua
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
hint = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.eslint.setup({
|
||||||
|
settings = {
|
||||||
|
codeActionOnSave = {
|
||||||
|
enable = true,
|
||||||
|
mode = "all",
|
||||||
|
},
|
||||||
|
format = true,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig.ts_ls.setup({
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user