Code Monkey home page Code Monkey logo

Comments (5)

rgroli avatar rgroli commented on May 31, 2024 1

I just added a fix for your problem. The commit automatically closed the issue. If it still remains feel free to reopen.

from other.nvim.

gmartsenkov avatar gmartsenkov commented on May 31, 2024

Something strange is happening when i spell out the folders though, instead of jumping to the repository folder it creates a new file.
It goes from lib/uplisting/entities/account.rb to /spec/uplisting/entities/account.rb instead of lib/uplisting/rom/repositories/account.rb when i select the "repository" context, not sure why it gets confused here. When i remove my test context mappings it goes correctly to the repositories/account.rb file 🤔

My config:

      require("other-nvim").setup({
        rememberBuffers = false,
        mappings = {
          {
            pattern = "/lib/(.*)/(.*).ex",
            target = "/test/%1/%2_test.exs",
            context = "test"
          },
          {
            pattern = "/test/(.*)/(.*)_test.exs",
            target = "/lib/%1/%2.ex",
            context = "test"
          },
          {
            pattern = "/lib/(.*)/(.*).rb",
            target = "/spec/%1/%2_spec.rb",
            context = "test"
          },
          {
            pattern = "/spec/(.*)/(.*)_spec.rb",
            target = "/lib/%1/%2.rb",
            context = "test"
          },
          {
            pattern = "/lib/(.*)/(.*).rb",
            target = "/spec/lib/%1/%2_spec.rb",
            context = "test",
          },
          {
            pattern = "/spec/lib/(.*)/(.*)_spec.rb",
            target = "/lib/%1/%2.rb",
            context = "test"
          },
          {
            pattern = "/lib/uplisting/entities/(.*).rb",
            target = "/lib/uplisting/rom/repositories/%1.rb",
            context = "repository",
          },
        },
      })

from other.nvim.

rgroli avatar rgroli commented on May 31, 2024

Okay, it should not do anything from the test context when the repository context is selected.

I try to reproduce it on my side to find the problem..
Can you tell me, which files in the "test" context are in which folders in your setup?

Regarding your first comment: You cannot use wildcards in the target, that's why it did not work. But that's different from the second issue.

from other.nvim.

gmartsenkov avatar gmartsenkov commented on May 31, 2024

Gotcha regarding the first comment, i can live with that.
Regarding the second:
All of my tests are in the spec folder and there is a spec/uplisting/entities/account_spec.rb file which opens correctly when i pick the test context, when i pick the repository context it opens spec/uplisting/entities/account.rb basically without the _spec.rb at the end

from other.nvim.

gmartsenkov avatar gmartsenkov commented on May 31, 2024

thanks a lot!!!

from other.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.