ybbond / nvim-lsp-extras

Some extra functionality I use to make neovim lsp a bit better

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim-lsp-extras

Some extra functionality I use to make neovim lsp a bit better. Depends on new functionality in Neovim 0.9 that was merged 10.01.2023

Installation

lazy.nvim

require("lazy").setup({
    { "seblj/nvim-lsp-extras" },
})

packer.nvim

use({ "seblj/nvim-lsp-extras" })

Setup

This plugin provides a setup function with the following default values. Each module can be set to false if you do not wish the functionality

require("nvim-lsp-extras").setup({
    signature = {
        border = "rounded",
    },
    mouse_hover = {
        border = "rounded",
    },
    lightbulb = {
        icon = "",
        diagnostic_only = true, -- Only lightbulb if line contains diagnostic
    },
    treesitter_hover = {
        highlights = {
            ["|%S-|"] = "@text.reference",
            ["@%S+"] = "@parameter",
            ["^%s*(Parameters:)"] = "@text.title",
            ["^%s*(Return:)"] = "@text.title",
            ["^%s*(See also:)"] = "@text.title",
            ["{%S-}"] = "@parameter",
        },
    },
})

Acknowledgement

Huge thanks to noice.nvim for initial implementation of treesitter injection in lsp hover doc. Check it out for an awesome UI-experience in neovim

About

Some extra functionality I use to make neovim lsp a bit better

License:MIT License


Languages

Language:Lua 100.0%