Skip to content

Conversation

erlestor
Copy link

@erlestor erlestor commented Feb 20, 2025

Closes #3

Changes (i may have gone out of scope)

  • You can now pass in opts.check_directories in your plugin config to check for a .nuxt folder nested in your cwd
  • Fixed a bug where I would goto definition on a component, but instead of components.d.ts it gave me a quickfix list with 2 different references. Then it wouldn't find components.d.ts in the current file and stop working
  • Nuxt-goto now automatically closes the components.d.ts file automatically so it feels like you're directly opening the reference. Same with quickfix list. This is how I want the plugin to work, but if you don't like it we can make it an option

How I configured nuxt-goto in lazy.nvim when testing:

{
    dir = "~/Documents/Koding/neovim-plugins/nuxt-goto.nvim",
    ft = "vue",
    event = "BufEnter",
    -- opts is completely optional
    opts = {
        -- format for the path. Eg start with "/" end without "/". Is very important
        check_directories = { "/apps/web" },
    },
}

This worked great for me using turborepo, but I havent tested on a normal nuxt project. It should work though because we check if cwd + /.nuxt is a directory which it should be.

I don't know how you pass options in packer so I didn't wanna edit the readme but since the plugin will still work as normal it shouldn't be a problem

If you've stopped maintaining this or don't wanna test my PR I'll just use my fork, but would be cool if you would check it out

@erlestor erlestor marked this pull request as draft February 20, 2025 10:37
@erlestor erlestor marked this pull request as ready for review February 20, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesnt work for me

1 participant