✨ feat(nvim): enable inlayhints in astro, svelte and vue-3 extras
This commit is contained in:
parent
332e54f6dc
commit
bd7991f9b3
3 changed files with 56 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
local inlay_hints_settings = {
|
||||
parameterNames = { enabled = "all" },
|
||||
parameterTypes = { enabled = true },
|
||||
variableTypes = { enabled = true },
|
||||
propertyDeclarationTypes = { enabled = true },
|
||||
functionLikeReturnTypes = { enabled = true },
|
||||
enumMemberValues = { enabled = true },
|
||||
}
|
||||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.astro" },
|
||||
{
|
||||
|
@ -5,6 +14,16 @@ return {
|
|||
opts = {
|
||||
servers = {
|
||||
astro = {
|
||||
settings = {
|
||||
typescript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
javascript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||
require("ts-error-translator").translate_diagnostics(err, result, ctx, config)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
local inlay_hints_settings = {
|
||||
parameterNames = { enabled = "all" },
|
||||
parameterTypes = { enabled = true },
|
||||
variableTypes = { enabled = true },
|
||||
propertyDeclarationTypes = { enabled = true },
|
||||
functionLikeReturnTypes = { enabled = true },
|
||||
enumMemberValues = { enabled = true },
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
|
@ -12,6 +21,16 @@ return {
|
|||
opts = {
|
||||
servers = {
|
||||
svelte = {
|
||||
settings = {
|
||||
typescript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
javascript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||
require("ts-error-translator").translate_diagnostics(err, result, ctx, config)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
local inlay_hints_settings = {
|
||||
parameterNames = { enabled = "all" },
|
||||
parameterTypes = { enabled = true },
|
||||
variableTypes = { enabled = true },
|
||||
propertyDeclarationTypes = { enabled = true },
|
||||
functionLikeReturnTypes = { enabled = true },
|
||||
enumMemberValues = { enabled = true },
|
||||
}
|
||||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.lang.vue" },
|
||||
{
|
||||
|
@ -5,6 +14,15 @@ return {
|
|||
opts = {
|
||||
servers = {
|
||||
volar = {
|
||||
settings = {
|
||||
typescript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
javascript = {
|
||||
updateImportsOnFileMove = { enabled = "always" },
|
||||
inlayHints = inlay_hints_settings,
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||
|
|
Loading…
Add table
Reference in a new issue