Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

benjaminbauer/nvim-lsplug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages