Comments (15)
No no this is clearly an issue. It's just that we have been dealing with Windows paths problem for so long and I have to launch a VM everytime to even just replicate the issue.
I've asked @bwpge to look into the issue #1353 (comment) so it should be fixed soon.
from neo-tree.nvim.
Sure. I could look into it tonight or tomorrow.
from neo-tree.nvim.
I'll take a look as well. Appreciate the detailed reporting on this issue :)
from neo-tree.nvim.
Looks like neo-tree opens the file with C:\\...
whereas netrw opens with C:/...
. So the number of slashes and front/back slash are the difference.
TBH language server must be able to parse both (or any) path style but gopls might not be clever enough.
@burgr033 Could you test if gopls works when you open the file with :e C:\...
(single back slash). Please type out the whole path manually. I want to be sure the problem is slash type or because of the double slash right after C:.
@cseickel Do you think we should use /
when passing the path to :e, :vs
etc? FYI I use / for all vim commands in the rewrite.
from neo-tree.nvim.
Thanks for your reply! The slash seems to be the problem.
:e C:\_workspace\temp\nvim_test\main.go
--> everything works correctly
:e C:\\_workspace\temp\nvim_test\main.go
--> does not work correctly
from neo-tree.nvim.
@burgr033 Thanks for testing.
BTW do you remember when you started seeing this issue? I suspect it started recently after this PR was merged which adds an additional backslash when dirname starts with a punctuation.
So the reason is that _workspace
starts with punctuation and a second backslash is added to escape _
in windows.
The PR was required when path contains several punctuation C:\(foo)\[bar]
, but looks like it backlashed on a _
.
If this is the case, I can fix it right away and FYI we will be using pathlib.nvim which will eliminate all these kind of problems in the future.
Just out of curiosity, why on earth did you start the name with _
?
from neo-tree.nvim.
Oh wow, I haven't thought about the _
haha. Thank you for the quick PR / Fix!
BTW do you remember when you started seeing this issue?
I started learning go a few weeks ago. So I couldn't really tell if this persisted longer.
Just out of curiosity, why on earth did you start the name with _?
It's some stupid legacy muscle memory stuff I picked up from my old work. I started it, because it's easier to find in the explorer, is always at the top of the folder list, when sorted by name, and it's really easy to cd
autocomplete.
from neo-tree.nvim.
Oh wow, I haven't thought about the
_
haha. Thank you for the quick PR / Fix!
I don't have a quick access to Windows so it might take a while. Sorry but please be patient...
BTW do you remember when you started seeing this issue?
I started learning go a few weeks ago. So I couldn't really tell if this persisted longer.
👍
Just out of curiosity, why on earth did you start the name with _?
It's some stupid legacy muscle memory stuff I picked up from my old work. I started it, because it's easier to find in the explorer, is always at the top of the folder list, when sorted by name, and it's really easy to
cd
autocomplete.
NGL this is quite interesting. I use fuzzy finder (fzf) nowadays so I don't need to sort in any means but I'll remember this trick. I used 00-
but it was kinda awkward...
from neo-tree.nvim.
@cseickel Do you think we should use / when passing the path to :e, :vs etc? FYI I use / for all vim commands in the rewrite.
Hopefully there is one true form that all windows related tools agree on. Whatever that is we should ensure all paths are run through a class/function to coerce them into that standard form.
I can't tell you how sick I am of Windows path issues! If it were only on me then I would officially not support Windows. As it is I just accept PRs that seem reasonable and I totally rely on actual Windows users to determine what works.
from neo-tree.nvim.
@cseickel Do you think we should use / when passing the path to :e, :vs etc? FYI I use / for all vim commands in the rewrite.
Hopefully there is one true form that all windows related tools agree on. Whatever that is we should ensure all paths are run through a class/function to coerce them into that standard form.
Good news, that is literally pathlib.nvim lol.
You have self:tostring() -> C:\(foo)\[bar], self:cmd_string() -> C:/(foo)/[bar], self:shell_string() -> 'C:/(foo)/[bar]'
which will export the path object into strings that always work for each cases without any compromises.
I can't tell you how sick I am of Windows path issues! If it were only on me then I would officially not support Windows.
LOL me too.
Well all issues should be resolved once we fully migrate to pathlib ;)
from neo-tree.nvim.
If this is too much of an edge case, I can live with renaming my folder tbh.
from neo-tree.nvim.
@burgr033 Could you help us out?
from neo-tree.nvim.
I was able to reproduce the issue with gopls (thanks for the good repro steps). I have a tentatively working solution with the _workspace
style path, so just wanted to communicate in case @burgr033 was working on anything and avoid duplicate work.
I'm just going to need to brute force inspect every Xworkspace
directory and make sure the solution handles all cases for valid NTFS symbols in the path.
from neo-tree.nvim.
I haven't gotten to do anything, so all good! Great that you have found a solution!
from neo-tree.nvim.
@burgr033 if you maybe have some time this weekend, could you be a second pair of eyes on #1388 and see if it fixes your issue without any other problems?
You should be able to just drop-in replace your plugin spec with my fork (bwpge/neo-tree.nvim
) and run :Lazy update neo-tree.nvim
, but you may have to also change the branch to main
if you're using v3.x
.
from neo-tree.nvim.
Related Issues (20)
- BUG: directories beginning or ending with symbol cause error in filesystem command `set_root` HOT 1
- Question: Does Neo-tree support symbolic link display? HOT 5
- Can't figure out how to make <CR> open the file but at the same time close the sidebar HOT 3
- [QUESTION] I try to add the root path from neo-tree to cokline sep HOT 11
- BUG: Floating neo-tree moves upon toggling file preview HOT 1
- BUG: Buffer with this name already exists HOT 13
- FEATURE: Show source selector tabs in the tabline HOT 16
- BUG: Default ACLs ignored when adding new file HOT 9
- BUG: Renaming when using alternative keyboard layout transliterates the name of the file into the layout HOT 15
- FEATURE: Put cursor in the beginning of line in normal mode HOT 17
- BUG: image preview doesn't work HOT 1
- Help Request: SignColumn transparency HOT 2
- BUG: icon and padding on the left disappears when clicking on the git signs HOT 3
- QUESTION: Changing default root location HOT 1
- FEATURE: Add 'refresh' command to force Neo-tree refresh HOT 2
- BUG: Error while focusing Neotree window on insert mode HOT 7
- BUG: neo-tree leaves a 0 buffer in jumps list
- BUG: Slow work when remap keys HOT 2
- BUG: auto select copied file not work sometimes HOT 3
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 neo-tree.nvim.