Comments (4)
Yes, this should work. The Navigator is not very workspace centric, but rather path centric. I suspect you just need lib
on the path.
Something like "perlnavigator.includePaths": [ "$workspaceFolder/mySubFolder/lib" ]
should work.
In general, most of the path resolution is done by perl itself using perl -c
, so as long as individual perl files can find their dependencies via -I
include paths, most of the features should work. Let me know if something doesn't work as expected with this setup.
from perlnavigator.
from perlnavigator.
Correct, the Navigator really isn't workspace oriented, it's oriented around single files. As long as each file does a use
on any dependency it needs, perl resolves all the files it needs and the Navigator is able to work well. Is there anything workspace-specific that the Navigator isn't currently finding? I suppose the use
module autocompletion will be missing things from subdirectories.
One thing that could help is automatically finding the root paths and adding them to the include path. For example, if I open lib/Bar/Baz.pm
which has package Bar::Baz
at the top, and it tries to use Bar::Qux
, it's pretty clear that the user needs to include that base lib
directory to get this to work. Adding it automatically would be a nice convenience feature. This would help for subdirectories in monorepos, and for users who simply open files without any workspace at all. However, this wouldn't work for any other files outside of that lib
directory. For example, with two different projects as subdirectories with lib
folders, one project would not be able to import from the other.
from perlnavigator.
Just curating tickets here and tagging this as "good first issue". Updating getAdjustedPerlCode
in diagnostics.ts would be a nice feature. Essentially, it should detect packages and automatically add the base path from that package.
from perlnavigator.
Related Issues (20)
- lsp-mode defaults to using PerlNavigator HOT 1
- VSCode - Seem unable to get perltidy to trigger HOT 2
- TypeError *.replace|replaceAll is not a function in neovim HOT 3
- inquistor failed with error: Can't Regexp::Common::FIRSTKEY HOT 3
- perlnavigator triggers a registerCapability handler for workspace/didChangeConfiguration despite dynamicRegistration set to false HOT 1
- Critic timeout HOT 2
- Highlighting of bitshift operator with constants HOT 5
- Highlighting of split HOT 2
- Publish 0.8.0 to open-vsx registry HOT 1
- Incorrect syntax errors reported with Carp::cluck HOT 2
- Allow use of more predefined VS Code variables in include paths HOT 1
- File::Find dies when a duplicate file is found HOT 2
- Extension not working out of the box in vscode for me HOT 4
- Publish new release to npm HOT 3
- Making linter failure easier to find HOT 7
- Set logging = true for all editors HOT 2
- Formatting document or selected text issue HOT 18
- Error with Nvchad HOT 4
- Is it possible to open modules directly (path is from Cygwin)? HOT 2
- Tidy formatting does not work "out of the box" (MacOS)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perlnavigator.