Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALESymbolSearch is searching outside of working directory #4857

Open
patrickReiis opened this issue Nov 5, 2024 · 3 comments
Open

ALESymbolSearch is searching outside of working directory #4857

patrickReiis opened this issue Nov 5, 2024 · 3 comments
Labels

Comments

@patrickReiis
Copy link

The Deno guide says ALE supports Deno via the Deno language server out of the box and in many uses cases doesn't require additional configuration

When I run :ALESymbolSearch <word>, instead of looking in my working directory, it looks in my entire operating system.

In this line of ALE docs: https://github.com/dense-analysis/ale/blob/master/doc/ale-typescript.txt#L81

It says that ALE tries finding a tsconfig.json file, however, deno has its own file called deno.json, so I think it doesn't work because I doesn't find this deno.json since it is trying to find a non existing file called tsconfig.json

deno.json: https://docs.deno.com/runtime/fundamentals/configuration/

Aside from this problem ALE is good, I need help please. It's all updated to latest. Both nvim and ALE.

@patrickReiis
Copy link
Author

Sorry to bother, could you help me sir?
@motato1

You already helped me once. You saved my life.

@motato1
Copy link
Contributor

motato1 commented Nov 7, 2024

I didn't try this, but my approach would be to add a buffer-local autocmd for the typescript Filetype event and then manually set the project root by using vim.fs.root(0, 'deno.json') (NeoVim only).

@hsanson
Copy link
Contributor

hsanson commented Nov 9, 2024

ALE does look for a deno.json file to determine the project root:

You can try checking what root is being detected by running this funcion inside vim:

:echo ale#handlers#deno#GetProjectRoot(0)

You can also force the project root using g:ale_deno_lsp_project_root:

:h g:ale_deno_lsp_project_root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants