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

Feature Request: Named Workspaces #16

Open
sboesebeck opened this issue Nov 27, 2022 · 7 comments
Open

Feature Request: Named Workspaces #16

sboesebeck opened this issue Nov 27, 2022 · 7 comments

Comments

@sboesebeck
Copy link

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

@distek
Copy link
Contributor

distek commented Nov 27, 2022

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)

@ldelossa
Copy link
Owner

ldelossa commented Nov 27, 2022

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"

@distek
Copy link
Contributor

distek commented Nov 27, 2022

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"

@sboesebeck
Copy link
Author

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!

@ldelossa
Copy link
Owner

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.

@sboesebeck
Copy link
Author

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

@ldelossa
Copy link
Owner

Yup, no worries, I had "Named Workspaces" on the list for features I want to implement.

@ldelossa ldelossa changed the title Feature Request: define sets of panels depending on file type or project settings Feature Request: Named Workspaces Nov 27, 2022
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