GithubHelp home page GithubHelp logo

nvim-lsplug's Introduction

A minimal LSP server manager for Neovim, inspired by vim-plug, humbly standing on the shoulders of nvim-lsp-installer

Motivation

I strive to be able to setup a new machine purely by scripts and config. To that end, I manage all of my configurations in git. The awesome vim-plug does that job for my nvim plugins. And while nvim-lsp-installer does save me the headache of manually installing and updating LSP servers, it does not allow me out of the box to manage the LSP serves I want installed as convenient as vim-plug for plugins.

Requirements

  1. a working installation of nvim-lsp-installer
  2. all the requirments of nvim-lsp-installer

Installation

Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer'
Plug 'benjaminbauer/nvim-lsplug'

Usage

Configuration

-- somewhere in your init.lua or in a lua block in your init.vim
local lsplug = require("nvim-lsplug")

-- valid servers: https://github.com/williamboman/nvim-lsp-installer/#available-lsps
lsplug.add("sumneko_lua")
lsplug.add("vimls")
-- optionally add data to pass through to setup
lsplug.add("jsonls", {commands = {
      Format = {
        function()
          vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
        end
      }
    }})
lsplug.add(..)

lsplug.finish()

Commands

Command Description
Lspluginstall Install all configured LSP servers
Lsplugclean Uninstall all manually installed LSP servers

Status

This is a scratch-your-own-itch plugin and a working alpha at best. It is literally the first time I am writing anything in Lua and also my first try of writing a vim plugin. I do not know if I will maintain this. If you are reading this, see the merit of this plugin and are more proficient in Lua, please feel free to reach out.

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.