Merge branch 'main' of codeberg.org:dnscio/nix-config
This commit is contained in:
commit
50968f8aec
1 changed files with 1 additions and 13 deletions
|
|
@ -1,7 +1,4 @@
|
||||||
local dnscUtils = require("dnsc.utils")
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init_options = { hostInfo = "neovim" },
|
|
||||||
cmd = { "typescript-language-server", "--stdio" },
|
cmd = { "typescript-language-server", "--stdio" },
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"javascript",
|
"javascript",
|
||||||
|
|
@ -13,20 +10,11 @@ return {
|
||||||
},
|
},
|
||||||
root_markers = { "tsconfig.json", "package.json", ".git" },
|
root_markers = { "tsconfig.json", "package.json", ".git" },
|
||||||
init_options = {
|
init_options = {
|
||||||
|
hostInfo = "neovim",
|
||||||
preferences = {
|
preferences = {
|
||||||
importModuleSpecifierPreference = "relative",
|
importModuleSpecifierPreference = "relative",
|
||||||
importModuleSpecifierEnding = "minimal",
|
importModuleSpecifierEnding = "minimal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
handlers = {
|
|
||||||
["textDocument/definition"] = function(err, result, method, ...)
|
|
||||||
if vim.tbl_islist(result) and #result > 1 then
|
|
||||||
local filtered_result = dnscUtils.filter(result, dnscUtils.filterReactDTS)
|
|
||||||
return vim.lsp.handlers["textDocument/definition"](err, filtered_result, method, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/definition"](err, result, method, ...)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
single_file_support = true,
|
single_file_support = true,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue