-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
lsp-nix completions dont work #4374
Comments
Can you give a small reproducible example of a nix file that works with other editors too ? |
example code{
inputs = {
nixpkgs.url = "github:nixOS/nixpkgs/release-23.05";
utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
utils,
...
}:
utils.lib.eachSystem ["i686-linux" "x86_64-linux"]
(system: let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages = {
nbfc = pkgs.stdenv.mkDerivation {
name = "nbfc-linux";
version = "0.1.15";
src = nixpkgs.lib.cleanSource ./.;
buildFlags = ["PREFIX=$(out)" "confdir=/etc"];
installFlags = ["PREFIX=$(out)" "confdir=$(out)/etc"];
installTargets = ["install-core" "install-configs" "install-docs" "install-completion"];
};
default = packages.nbfc;
};
});
} |
@Celibistrial Thanks, that helps. I tried reproducing it in my emacs, but unfortunately couldn't: I'm using |
Hmm , in that case its probably a doom emacs specific issue. Relevant parts of my personal config(after! lsp-ui
(setq lsp-ui-sideline-show-code-actions nil)
(setq lsp-headerline-breadcrumb-enable t)
(setq lsp-enable-symbol-highlighting t)
(setq lsp-signature-auto-activate t)
(setq lsp-headerline-breadcrumb-enable t)
(setq lsp-ui-sideline-enable t)
(setq lsp-ui-sideline-enable t)
(setq lsp-modeline-code-actions-enable t)
(setq lsp-ui-sideline-enable t)
(setq lsp-eldoc-enable-hover t)
(setq lsp-completion-show-detail t)
(setq lsp-completion-show-kind t))
;; //(setq lsp-auto-guess-root t)
(defun lsp-ui-sideline--compute-height nil '(height unspecified))
(use-package! lsp-nix
:ensure lsp-mode
:after
(lsp-mode)
:demand t
:custom
(lsp-nix-nil-formatter
["alejandra"]))
|
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
No completions when using nil language sever in emacs but works in other code editors (tested in neovim and VScode)
Same issue reported here oxalica/nil#117
Steps to reproduce
Open .nix file and M-x lsp!
Expected behavior
Pressing space+tab should give context appropriate completions but instead gives generic completions / no completions at all
Which Language Server did you use?
lsp-nix
OS
Linux
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: