nanotee/nvim-lsp-basics

github github
neovim-0.5 plugin
star 13
stars
alert-circle 1
open issues
users 2
subscribers
git-branch 0
forks
CREATED

2021-04-25

UPDATED

5 months ago

packer

require('packer').startup(function()
  use 'nanotee/nvim-lsp-basics'
end)

paq

require "paq" { 
  'nanotee/nvim-lsp-basics'
}

nvim-lsp-basics

The shiny new built-in LSP client is awesome, but a large portion of its features don't have any associated mappings or ex-commands, unlike the tags feature. This kind of configuration is instead left up to the user, which can result in a lot of boilerplate.

This plugin attempts to fix that by providing basic mappings and user-commands.

Installation

-- packer.nvim
use 'nanotee/nvim-lsp-basics'

-- paq-nvim
paq 'nanotee/nvim-lsp-basics'
" vim-plug
Plug 'nanotee/nvim-lsp-basics'

Usage

Setup the plugin with nvim-lspconfig

require'lspconfig'.<languageserver>.setup{
    on_attach = function(client, bufnr)
        local basics = require('lsp_basics')

        basics.make_lsp_commands(client, bufnr)
        basics.make_lsp_mappings(client, bufnr)
    end
}

User Commands

See the docs for a list of user commands

Commands are created per buffer and only if the server has the associated capability. This way it's easy to tell at a glance what the server does or doesn't support.

Tab-completion is provided for commands that accept arguments (when applicable).

Mappings

TODO!

Other cool LSP plugins