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

feat: add lsp_status component to display active LSPs and progress #1376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andreihh
Copy link

Closes #1375.

Following an example of a simple LSP progress using notifications: https://github.com/folke/snacks.nvim/blob/main/docs/notifier.md#-examples, we implement a simple lsp_status component that:

  • Defines an autocmd on LspProgress to update the spinner state and refreshes Lualine if the state changed
  • Displays the list of active LSPs with the corresponding spinner state if supported by the LSP

Not all LSPs support progress (e.g., bashls does not). In that case, we simply skip the spinner and display only the LSP name.

LSPs are separated by a configurable delimiter. The progress state symbols are also configurable.

Screenshots:
lualine-bashls-no-progress
lualine-lua_ls-done
lualine-lua_ls-progress

@andreihh andreihh force-pushed the master branch 2 times, most recently from cdc0277 to ed2f8b0 Compare February 15, 2025 02:53
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.

Feat: provide simple lsp_status component
1 participant