Giter Club home page Giter Club logo

Comments (10)

jakewvincent avatar jakewvincent commented on May 22, 2024 1

Huh, puzzling! Please do comment again if you figure out what's causing it.

from mkdnflow.nvim.

jakewvincent avatar jakewvincent commented on May 22, 2024

Thanks for reporting this! It's all consistently nvim_wd_heel now. (vimwd_heel will still work for now--the compat module will convert it to nvim_wd_heel if it finds the vimwd_heel key.)

from mkdnflow.nvim.

idr4n avatar idr4n commented on May 22, 2024

Hi and thanks for this cool plugin!

It seems like nvim_wd_heel is not working for me either (I just installed your plugin) . This is my perspective setting:

perspective = {
	priority = "root",
	fallback = "root",
	root_tell = ".wiki_root",
	nvim_wd_heel = false,
},

Say that I start an nvim session in cwd ~/foo which is not a wiki directory (it doesn't have a.wiki_root file). Then I start editing a note in a subdirectory, say ~/foo/bar/note.md, then nvim's current working directory changes to ~/foo/bar, but I want it to stay in ~/foo.

The only way in which I have managed to get the behavior I want is with fallback = false, irrespective of nvim_wd_heel being set to true or false. Could you please clarify if this is the expected behavior? I'm asking as I didn't see in the documentation that fallback = false is a valid setting.

Thanks in advance!

from mkdnflow.nvim.

jakewvincent avatar jakewvincent commented on May 22, 2024

Hi @idr4n, thanks for trying out the plugin! Oddly, I can't reproduce this. false is not technically a valid setting for fallback, but I don't know if it will specifically cause any issues--you could probably keep it like that. When you start editing the note in the subdirectory, how are you opening that note? Are you following it using the plugin's mappings, or are you opening it with another tool, such as Telescope?

from mkdnflow.nvim.

idr4n avatar idr4n commented on May 22, 2024

Hi and thanks for the quick reply.

Yes, I open the note with Telescope or fzf.vim. By plugin mapping you mean with <CR> when on top of a link?

from mkdnflow.nvim.

jakewvincent avatar jakewvincent commented on May 22, 2024

Right, that's what I meant. I think it may be Telescope/fzf that is changing your working directory since I can't reproduce this on my end. I double-checked the function that changes working directory and can't see any accidental loopholes that would cause mkdnflow to change working directories without nvim_wd_heel being true. Can you run the following for me from a vim session just to make sure that your nvim_wd_heel setting is correctly recognized?

lua print(require('mkdnflow').config.perspective.nvim_wd_heel)

from mkdnflow.nvim.

idr4n avatar idr4n commented on May 22, 2024

Hi again,

lua print(require('mkdnflow').config.perspective.nvim_wd_heel) prints false.

I think it may be Telescope/fzf that is changing your working directory since I can't reproduce this on my end.

It might be something in my config. However, without your plugin installed, Telescope/fzf does not change my working directory, it only happens when your plugin is installed/enable.

Don't worry, however, I have been using fallback set to false and at least for now I have not encountered issues with that. Actually, it seems that the main functionality such as MkdnEnter does not work with that setting, so setting it back to root.

Thanks again!

from mkdnflow.nvim.

jakewvincent avatar jakewvincent commented on May 22, 2024

I see, how strange! Let me do a little more testing (with Telescope) to see if I can reproduce this and what might be causing the working directory change.

from mkdnflow.nvim.

jakewvincent avatar jakewvincent commented on May 22, 2024

Still having trouble reproducing this, even with Telescope and various perspective settings. At first I thought maybe the plugin was being initialized each time you're switching buffers using Telescope, but it doesn't seem like that's happening in testing. In a session with mkdnflow enabled, what do you get when you issue :set autochdir? (including the question mark)?

from mkdnflow.nvim.

idr4n avatar idr4n commented on May 22, 2024

:set autochdir? prints noautochdir.

If you are not being able to reproduce this don't worry then, it might be some hidden setting in my config. I will explore it on my side. Thanks again!

from mkdnflow.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.