✨ 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 {
|
return {
|
||||||
{ import = "lazyvim.plugins.extras.lang.astro" },
|
{ import = "lazyvim.plugins.extras.lang.astro" },
|
||||||
{
|
{
|
||||||
|
@ -5,6 +14,16 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
astro = {
|
astro = {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||||
require("ts-error-translator").translate_diagnostics(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 {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
@ -12,6 +21,16 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
svelte = {
|
svelte = {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||||
require("ts-error-translator").translate_diagnostics(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 {
|
return {
|
||||||
{ import = "lazyvim.plugins.extras.lang.vue" },
|
{ import = "lazyvim.plugins.extras.lang.vue" },
|
||||||
{
|
{
|
||||||
|
@ -5,6 +14,15 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
volar = {
|
volar = {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
|
inlayHints = inlay_hints_settings,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
|
||||||
|
|
Loading…
Add table
Reference in a new issue