Open beaugunderson opened 1 year ago
Hey I'm using nvim
with typescript-language-server
and mason
and it works for me. If you've followed every step from readme it should work out of the box.
the only thing I've done differently is added a non-existent path as the paths array and used the @ts-strict comment instead so that my project is opt-in instead of opt-out... it works for tsc-strict but I get nothing in vim sadly
Could you share you vim config?
@KostkaBrukowa sure! here you go: https://gist.github.com/beaugunderson/7acffd22a8df616cba263655aaa6b6fe
and alternately, since yours is working, if you share yours I can see how it differs from my own :)
Just fyi, I ran across this issue and took many hours of debugging but I realized it was due to a pathing issue for me.
Basically I had a few tsconfig.json
scattered throughout my proj directory, that extends the main one in root.
But because the root directory
for mason tsserver resolves to the nearest tsconfig
... it ended up with the wrong root dir which mean't all the relative paths included in the plugin technically were incorrect.
i.e.
// main tsconfig.json in root
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-strict-plugin",
"paths": [
"foo/bar/baz",
]
}
]
}
// tsconfig.json in foo/bar
{
extends: "../../tsconfig.json"
}
Above setup causes:
tsserver root dir = root/foo/bar
and now the plugin path instead of being ./foo/bar/baz
which I expected, ended up being root/foo/bar/foo/bar/baz
which does not exist.
Thus the following worked for me:
./
path for the pluginYMMV however
Hi there, I'm using neovim with the
typescript-language-server
language server. How can I see my strict violations using this language server?I use mason to manage my LSP configs, so the version installed gets installed by mason as:
Anyone had luck getting this working in vim?