Giter VIP home page Giter VIP logo

Comments (4)

psibi avatar psibi commented on June 20, 2024

Pressing space+tab should give context appropriate completions but instead gives generic completions / no completions at all

Can you give a small reproducible example of a nix file that works with other editors too ?

from lsp-mode.

Celibistrial avatar Celibistrial commented on June 20, 2024
vscode

image

emacs

image

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;
      };
    });
}

from lsp-mode.

psibi avatar psibi commented on June 20, 2024

@Celibistrial Thanks, that helps. I tried reproducing it in my emacs, but unfortunately couldn't:

nix-lsp-mode

I'm using company-mode for the completions.

from lsp-mode.

Celibistrial avatar Celibistrial commented on June 20, 2024

Hmm , in that case its probably a doom emacs specific issue.

Whats weird is it does seem to give completions but only when i type in the first letter

image
image
image

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"]))

from lsp-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.