nvim-ide
nvim-ide copied to clipboard
Feature Request: Named Workspaces
Hi,
I am working a lot with different projects and different languages (bash, python, java, lua, rust...). So it would be awesome to have the ability to change the default panels depending on the filetype being used. and which panels are opened and which are not.
I would probably try to rely on existing features for this functionality, like adding some code to ftplugin-dir.
e.g. when opening bash-scripts, it would open an explorer on the right, but probably not outline (outline does not really work with lua or bash - maybe another feature request).
when opening a java-file (or related), it would show more panels, maybe by default.
It was mentioned to have some kind of named configurations, so it would be great to use those for example in ftplugins or anything alike...
I hope that does make sense...
As a workaround, though I think this would be nice to have builtin, you could call require('ide').setup({...})
in a ftplugin and modify the config as needed for the file type. However this won't change based on the file type if you open a new buffer after opening a different file type (tested all this just now)
I like this idea.
@sboesebeck
If its not possible to tie it to file type, would simply having "Named Workspaces" work as well?
For instance you could start nvim and type "Workspace Bash" to setup a workspace specifically for Bash development?
My question is also tho, what really changes in the workspace, since most components are pretty general to "code editing"
what really changes in the workspace, since most components are pretty general to "code editing"
I could see this being beneficial if the user's written their own custom component that does something with the particular filetype.
+1 on the "named workspaces"
As a workaround, though I think this would be nice to have builtin, you could call require('ide').setup({...}) in a ftplugin and modify the config as needed for the file type. However this won't change based on the file type if you open a new buffer after opening a different file type (tested all this just now)
yes. This might work for most cases actually. maybe that's the way to go for the time being.
If its not possible to tie it to file type, would simply having "Named Workspaces" work as well? For instance you could start nvim and type "Workspace Bash" to setup a workspace specifically for Bash development?
Yes, that would work - but if the functionality is there, I could also call it from ftplugin
or in some other lua script - that is exactly my idea. Do not re-invent the wheel - everyone can use the method to their liking and you do not need to implement something.
So, if there is an API for that, e.g. require("ide").callWorkspace('MyWonderfulConfig')
I could easily put it in all the ftplugin-files I need this functionality for. And if it is possible to switch between them while running, that would be awesome!
As a workaround, though I think this would be nice to have builtin, you could call require('ide').setup({...}) in a ftplugin and modify the config as needed for the file type. However this won't change based on the file type if you open a new buffer after opening a different file type (tested all this just now)
yes. This might work for most cases actually. maybe that's the way to go for the time being.
If its not possible to tie it to file type, would simply having "Named Workspaces" work as well? For instance you could start nvim and type "Workspace Bash" to setup a workspace specifically for Bash development?
Yes, that would work - but if the functionality is there, I could also call it from
ftplugin
or in some other lua script - that is exactly my idea. Do not re-invent the wheel - everyone can use the method to their liking and you do not need to implement something.So, if there is an API for that, e.g.
require("ide").callWorkspace('MyWonderfulConfig')
I could easily put it in all the ftplugin-files I need this functionality for. And if it is possible to switch between them while running, that would be awesome!
Yup this sounds cool.
Its just a matter of creating the concept and API around "Named Workspaces".
We can start planning that.
cool - I am not a really good lua developer, so I'm probably just of little to no help here. But I am willing to help where I can
Yup, no worries, I had "Named Workspaces" on the list for features I want to implement.