Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to ignore the root of the system #68

Open
Manix80 opened this issue Mar 29, 2023 · 3 comments
Open

how to ignore the root of the system #68

Manix80 opened this issue Mar 29, 2023 · 3 comments

Comments

@Manix80
Copy link

Manix80 commented Mar 29, 2023

hi,

is it possible not to display the root of the system? for example: /sys ...

when I type / I automatically get the root.

in the doc there is the option "get_cwd" but I don't know how to do it.

the best would be to be able to display the current directory.

I have the same configuration as here: https://github.com/sar/cmp.nvim#setup

with the exception that I added this:

cmp.setup({
...
  sources = cmp.config.sources({
    ...
    { name = "path" },
    ...
  )}
...
})

thanks

@liquiddandruff
Copy link

liquiddandruff commented Apr 12, 2023

Yeah, at the moment using default configs this is causing :e <anything> to hang for 1 minute on WSL2, it's finding things like random DLLs from IDK where. Need to make this configurable otherwise it's not usable atm.

From looking at the source it doesn't appear there's a way to do this through the existing options atm.

Edit: nvm, this seems to be a cmp-cmdline issue:

  -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
  cmp.setup.cmdline(':', {
    mapping = cmp.mapping.preset.cmdline(),
    sources = cmp.config.sources(
	{
      { name = 'path' }
    })
	-- {
    --   { name = 'cmdline' }
    -- })
  })

above doesn't freeze when I do :e /, everything works and I get path completions.

But when I enable cmdline, then :e <anything> lags.

  -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
  cmp.setup.cmdline(':', {
    mapping = cmp.mapping.preset.cmdline(),
    sources = cmp.config.sources(
	{
      { name = 'path' }
    },
	{
      { name = 'cmdline' }
    })
  })

EDIT: OK actually my cwd was in system32 for some reason (thanks wsl) so that's why cmp-path was picking up all these DLLs. It's not a global search afterall; user error, please ignore 😅. Still it shouldn't block this hard though, but I guess that's an issue with cmp-cmdline

@Manix80
Copy link
Author

Manix80 commented Apr 17, 2023

I haven't found a solution for this problem, which isn't a problem in fact, just a habit to get into and be a little more careful with a "/".

@NullVoxPopuli
Copy link

NullVoxPopuli commented Sep 3, 2023

I just ran in to this and had to disable cmp-path -- I thought neovim was freezing whenever I typed a comment (// or /*) -- or a self-closing element (<br />) -- or ever just / in the middle of a sentence (this / related-this)

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

No branches or pull requests

3 participants