oxalica / nil

NIx Language server, an incremental analysis assistant for writing in Nix.
Apache License 2.0
1.35k stars 40 forks source link

Completion in Doom Emacs doesn't work #117

Open hexagonal-sun opened 9 months ago

hexagonal-sun commented 9 months ago

Hello,

I have nil enabled as the lsp plugin in my doom configuration for editing nix files. The server starts successfully when I open a nix file to edit; I can run code actions and see diagnostics relating to my code, however there is no completion at all.

As a test, I have created a file ~/foo/test.nix with:

{ config, lib, pkgs, ... }:

{
  foo = builtins
}

I then open the file in Emacs, move the cursor to the end of the builtins keyword and insert a .. At that point I would expect completion to appear showing all builtin functions.

I have attached a log of all the IO occuring between Emacs and nil.

nil.log

Note that if I open the same file with the same version of nil in VSCode, completion works.

maurobalbi commented 9 months ago

The client should send a textDocument/completion request to ask for completions, however no such request is sent to the server according to the logs. Seems there is something going wrong on the client side.

Celibistrial commented 6 months ago

did you manage to solve this issue?

Celibistrial commented 1 month ago

After switching from company to corfu this issue has gone away