natecraddock / workspaces.nvim

a simple plugin to manage workspace directories in neovim
MIT License
309 stars 15 forks source link

add api arguments don't work as intended #26

Closed 0x0013 closed 1 year ago

0x0013 commented 1 year ago

When trying to add a workspace using workspaces.add(path: string, name: string), using a full path, the path is modified and it doesn't work.

For example, when running

require('workspaces').add('/home/myuser/tmp', 'testname')

I get an error "Path '/home/myuser/testname' does not exist" (where /home/myuser is my cwd in this case). However, if I swap the arguments (use "testname" as path, and "/home/myuser/tmp" as name), it works as intended.

natecraddock commented 1 year ago

@0x0013 Sorry for the delay!

I just looked into this, sorry this went undetected for so long! This is related to changes I made with an older version of the API that swapped the arguments of the add function. I just pushed a commit to fix this