-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
Code editor
neovim
Platform
Linux
Version
5.6.0
What steps will reproduce the bug?
- os: nixos (25.11.20250731.8679b16 (Xantusia))
- neovim lsp config: https://github.com/neovim/nvim-lspconfig/blob/5a49a97f9d3de5c39a2b18d583035285b3640cb0/lsp/bashls.lua#L12-L29
How often does it reproduce? Is there a required condition?
All the time
What is the expected behavior?
Complete for native executables.
What do you see instead?
No completion for native commands
Only shell builtins would appear in completion
Additional information
I didn't know bashls can complete commands until I saw #294.
Not sure whether related but, nixos neither use pkg-config
or install bash-completion
under /usr/shared
, so this might not work:
bash-language-server/server/src/get-options.sh
Lines 4 to 19 in d531143
COMPLETIONSDIR="$(pkg-config --variable=completionsdir bash-completion)" | |
if (( $? == 0 )) | |
then | |
COMPLETIONSRC="$(dirname "$COMPLETIONSDIR")/bash_completion" | |
else | |
# Fallback if pkg-config fails | |
if [ "$(uname -s)" = "Darwin" ] | |
then | |
# Running macOS | |
COMPLETIONSRC="$(brew --prefix)/etc/bash_completion" | |
else | |
# Suppose running Linux | |
COMPLETIONSRC="${PREFIX:-/usr}/share/bash-completion/bash_completion" | |
fi | |
fi |
And I guess it's because bashls does not search on /home/<user>/.nix-profile/bin
(shouldn't it search on $PATH
?)
Some executables under /bin
are presented in completion.
Metadata
Metadata
Assignees
Labels
No labels