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

nixd Language server does not show auto-completion for specified options #4674

Open
2 of 3 tasks
DrBuhu opened this issue Jan 5, 2025 · 0 comments
Open
2 of 3 tasks
Labels

Comments

@DrBuhu
Copy link

DrBuhu commented Jan 5, 2025

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

The autocomplete on special functions like pkgs, and homemanager doesnt seem to work, pressing tab doesn't show any options as it would with other functions.

Steps to reproduce

Using: doom emacs
Going into a nix configuration file
Pressing: tab on pkgs. /home-manager
Code:

(use-package nix-mode
  :after lsp-mode
  :custom
  (lsp-disabled-clients '((nix-mode . nix-nil))) ;; Disable nil so that nixd will be used as lsp-server
  :config
  (setopt lsp-nix-nixd-server-path "nixd"
    lsp-nix-nixd-formatting-command [ "nixpkgs-alejandra" ]
    lsp-nix-nixd-nixpkgs-expr "import (builtins.getFlake \"/etc/nixos/\").inputs.nixpkgs { }"
    lsp-nix-nixd-home-manager-options-expr "(builtins.getFlake \"/etc/nixos\").homeConfigurations.unwary.options"
  )

)

Full code:
https://github.com/DrBuhu/.doom.d/blob/main/config.el
https://github.com/DrBuhu/.doom.d/blob/main/init.el

Expected behavior

List of packages/options of home home manager

Which Language Server did you use?

lsp-nixd

OS

Linux

Error callstack

No response

Anything else?

No response

@DrBuhu DrBuhu added the bug label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant