Git Product home page Git Product logo

Comments (8)

killtheliterate avatar killtheliterate commented on May 18, 2024 2

Heh, I had set autochdir for... some reason. Removing that makes :Mix test behave as expected.

from alchemist.vim.

aerosol avatar aerosol commented on May 18, 2024

If you open a test file with vim test/foo_test.exs that behaviour is expected. You can use for example vim-rooter if you want to alter the default vim behaviour regarding cwd handling. My 2 cents is this should not be alchemist.vim's concern.

from alchemist.vim.

slashmili avatar slashmili commented on May 18, 2024

@killtheliterate it works for me, I'm not sure why it doesn't work in your box, can you do something like this with your project and past the response here:

milad@laptop-2 ~/d/ex_guard (master)> ls -l
total 88
...
-rw-r--r--   1 milad  staff  1163 May  3 22:35 mix.exs
-rw-r--r--   1 milad  staff   179 Mar 20 02:26 mix.lock
...
milad@laptop-2 ~/d/ex_guard (master)> vim -c ":Mix test"

...................
error connecting to VAL (No such file or directory)
..
error connecting to VAL (No such file or directory)
.

Finished in 0.1 seconds (0.1s on load, 0.06s on tests)
22 tests, 0 failures

One extra note, Mix command only defined if you don't have any other Mix plugin

from alchemist.vim.

killtheliterate avatar killtheliterate commented on May 18, 2024

@slashmili I think this may be a problem with netrw or something. If I have a file open that lives in the project root, like mix.exs, then :Mix test runs, no problem. If I then open a file that lives in lib, thats when alchemist mentions that it cannot find a mix file.

If I have mix.exs open, and then use either netrw or :e lib/foo.ex to open another file, :Mix test breaks in that scenario as well.

I'll examine my neovim config to see if there is something thats changing directory on file open.

from alchemist.vim.

slashmili avatar slashmili commented on May 18, 2024

Could you record the cases that you mention with asciinema.org

from alchemist.vim.

killtheliterate avatar killtheliterate commented on May 18, 2024

@slashmili
asciicast

from alchemist.vim.

slashmili avatar slashmili commented on May 18, 2024

I see.

Looks like there is something wrong with your vim settings, I did the same thing here : https://asciinema.org/a/40ob1mhx8dcgwb404xf6k5xkj

from alchemist.vim.

killtheliterate avatar killtheliterate commented on May 18, 2024

I'll try fiddling around to see if I can get it working as expected. For reference, here is my .vimrc

from alchemist.vim.

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.