/lsp-toggle.nvim

Disable/Enable LSP clients and NullLS sources for buffers.

Primary LanguageLuaApache License 2.0Apache-2.0

lsp-toggle.nvim

Disable/Enable LSP clients for buffers.

preview.gif

Dependencies

Versions

Read the tags. The versions follows the rules of SemVer 2.0.0.

Installation

Using vim-plug

Plug 'neovim/nvim-lspconfig'
Plug 'adoyle-h/lsp-toggle.nvim'

Using packer.nvim

use { 'neovim/nvim-lspconfig' }
use { 'adoyle-h/lsp-toggle.nvim' }

Using dein

call dein#add('neovim/nvim-lspconfig')
call dein#add('adoyle-h/lsp-toggle.nvim')

Usage

require('lsp-toggle').setup()

or

require('lsp-toggle').setup {
  create_cmds = true, -- Whether to create user commands
  telescope = true, -- Whether to load telescope extensions
}

It provides two commands:

  • ToggleLSP: Disable/Enable LSP for current buffer.
  • ToggleNullLSP: Disable/Enable NullLS source for all buffers.

These commands use vim.ui.select to open a select window for LSPs.

If telescope enabled, it will load two telescope extensions which named ToggleLSP and ToggleNullLSP.

Suggestion, Bug Reporting, Contributing

Before opening new Issue/Discussion/PR and posting any comments, please read Contributing Guidelines.

Copyright and License

Copyright 2022-2024 ADoyle (adoyle.h@gmail.com). Some Rights Reserved. The project is licensed under the Apache License Version 2.0.

See the LICENSE file for the specific language governing permissions and limitations under the License.

See the NOTICE file distributed with this work for additional information regarding copyright ownership.

Other Projects