Skip to content

Conversation

@Konfekt
Copy link
Contributor

@Konfekt Konfekt commented Oct 26, 2025

As discussed with @jclsn at jclsn/vimconfig@d62cc05

@Konfekt
Copy link
Contributor Author

Konfekt commented Oct 26, 2025

Maybe mention that the hover fallback is most useful for file types such as python that come with decent &keywordprg in $VIMRUNTIME/ftplugin

For some LS, like CMake's neocmakelsp or cmake-language-server, a dedicated keywordprg such as https://github.com/bfrg/vim-cmake-help can serve as complement for missing built-in functionality

@jclsn
Copy link
Contributor

jclsn commented Oct 26, 2025

I think this fallback should be made optional too btw. Maybe add a config item. It might be confusing if this is the default behavior.

The hover could also be made optional per-server. It is annoying in C, but in Python it's actually nice to have both.

@Konfekt
Copy link
Contributor Author

Konfekt commented Oct 27, 2025

I think this fallback should be made optional

I made both fallbacks opt-ins.

It is annoying in C

The standard &keywordprg is pretty useless. The fallback should only happen for file type specific keywordprg's now

@jclsn
Copy link
Contributor

jclsn commented Oct 27, 2025

Nice, this look pretty complete to me now! :) Can also always be improved later

@Konfekt Konfekt marked this pull request as draft October 27, 2025 08:40
@Konfekt Konfekt marked this pull request as ready for review October 27, 2025 08:50
@jclsn
Copy link
Contributor

jclsn commented Oct 27, 2025

Getting an error here in YAML files when trying to hover

Error: Language server for "yaml" file type supporting "hover" feature is not found
Fehler beim Ausführen von "function lsp#lsp#Hover":
Zeile   14:
E716: Schlüssel "hover" nicht im Dictionary vorhanden

@Konfekt
Copy link
Contributor Author

Konfekt commented Oct 27, 2025

Thank you, another forgotten return. Should be fixed

@yegappan yegappan merged commit 3238b97 into yegappan:main Oct 28, 2025
2 checks passed
techntools pushed a commit to techntools/lsp that referenced this pull request Nov 7, 2025
* add fallbacks to built-ins to :LspHover/GotoDefintion

As discussed with @jclsn at jclsn/vimconfig@d62cc05

* only fallback for custom &keywordprg as kindly pointed out by @jclsn

* fallback if no definition found as kindly suggested by @jclsn

* fix typo (peek turning into peekSymbol elsewhere)

* make fallbacks opt-in and document them

* doc: expand recommended set-up

* use built-in tjump map

* hover: fix typo

* remove redundant check

* add back forgotten return

* add back forgotten return statement

* use built-in tjump map

* address suggestions kindly pointed out by @yegappan

* use more correct wording (as tags are neither tied to C nor ctags)

* use more robust map instead of command as suggested by @yegappan
Konfekt added a commit to Konfekt/lsp that referenced this pull request Dec 7, 2025
using the mappings the selection dialog would not accept user input;
this amends [0]

[0]: yegappan#689
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.

3 participants