GithubHelp home page GithubHelp logo

lsp-nix's Introduction

Nix Flake: Language Servers

Packages included:

CLI tools (to be used with diagnostic-language-server):

Usage

With Flakes

Add this repo to your flake.nix inputs like:

{
  # ...
  inputs.lsp-nix.url = "github:thelonelyghost/lsp-nix";
  # ...

  outputs = { self, nixpkgs, flake-utils, lsp-nix, ...}@attrs:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
      };
      lsp = lsp-nix.packages."${system}";
    in {
      devShell = pkgs.mkShell {
        nativeBuildInputs = [
          pkgs.bashInteractive
          lsp.dot-language-server
        ];
      };
    });
}

Updating: Anytime you want to update what lsp-nix offers, run nix flake lock --update-input lsp-nix and rebuild your nix expression acccordingly.

Without Flakes

If you're not yet using Nix Flakes, such as with home-manager, here's how you can include it:

  1. Install niv and run niv init
  2. Run niv add thelonelyghost/lsp-nix --name lsp-nix
  3. Include the following in your code:
{ lib, config, ... }:

let
  sources = import ./nix/sources.nix {};
  pkgs = import sources.nixpkgs {};

  lsp = (import (pkgs.fetchFromGitHub { inherit (sources.lsp-nix) owner repo rev sha256; })).outputs.packages."${builtins.currentSystem}";
in
{
  home.packages = [
    lsp.dot-language-server
  ];
}

Updating: Anytime you want to update what lsp-nix offers, run niv update lsp-nix and rebuild your nix expression acccordingly.

lsp-nix's People

Contributors

thelonelyghost avatar

Watchers

 avatar  avatar  avatar

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.