GithubHelp home page GithubHelp logo

jinzhongjia / lspui.nvim Goto Github PK

View Code? Open in Web Editor NEW
164.0 4.0 3.0 740 KB

A modern and useful UI plugin that wraps lsp operations.

License: MIT License

Lua 99.50% Nix 0.49% Shell 0.01%
neovim-plugin neovim-lua-plugin

lspui.nvim's Introduction

LspUI.nvim

A plugin which wraps Neovim LSP operations with a nicer UI.

✨ Features

  • Custom implementations of common LSP functions
  • Great out of the box UI
  • Due to reimplementation of builtins, potentially better performance than builtin neovim functions.
  • Supported features:
    • Code Action (nvim plugin can register code_action)
    • Rename
    • Hover
    • Show Diagnostics
    • Definiton
    • Type Definition
    • Declaration
    • Reference
    • Implementation
    • Inlay Hint
    • Signature Help

📦 Installation

  • Requires neovim 0.10
{
  "jinzhongjia/LspUI.nvim",
  branch = "main",
  config = function()
    require("LspUI").setup({
	  -- config options go here
	  })
  end
}
use {
  "jinzhongjia/LspUI.nvim",
	branch = 'main',
	config = function()
    require("LspUI").setup({
	  -- config options go here
	  })
  end
}

⚙️ Configuration

local LspUI = require("LspUI")
LspUI.setup()

more about here

🚀Commands

  • LspUI hover: Open an LSP hover window above cursor
  • LspUI rename: Rename the symbol below the cursor
  • LspUI code_action: Open a code action selection prompt
  • LspUI diagnostic next: Go to the next diagnostic
  • LspUI diagnostic prev: Go to the previous diagnostic
  • LspUI definition: Open the definition
  • LspUI type_definition: Open the type definition
  • LspUI declaration: Open the declaration
  • LspUI reference: Open the reference
  • LspUI implementation: Open the implementation
  • LspUI inlay_hint: Quickly open or close inlay hint

Current Goals / Roadmap

You can see the current goals here.

Reference

lspui.nvim's People

Contributors

github-actions[bot] avatar jinzhongjia avatar johnpyp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lspui.nvim's Issues

Notice this guy is a thief

Delete your repo. thief. You stole all glepnirr's code and ideas. You have not made any contribution or sponsorship to his project.
Obviously you are Chinese. Only you Chinese are so disrespectful of the spirit of open source. fucking stupid guy!! get fuck out of neovim

Failed to run LspUI.nvim

Failed to run config for LspUI.nvim

...cal/share/nvim/lazy/LspUI.nvim/lua/LspUI/rename/util.lua:2: attempt to index field 'Methods' (a nil value).

How to fix it? Thank you!

inlay_hint error (bufnr expected number) after updating plugin to latest

Hello, I recently updated LspUI and started having this issue.
I'm using neovim v0.10.0-dev

Error detected while processing LspAttach Autocommands for "*":                                                                                                                      
Error executing lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:369: bufnr: expected number, got boolean
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        /usr/local/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:369: in function 'inlay_hint'
        .../.vim/vendor/LspUI.nvim/lua/LspUI/inlay_hint/init.lua:108: in function <.../.vim/vendor/LspUI.nvim/lua/LspUI/inlay_hint/init.lua:68>
        [C]: in function 'nvim_exec_autocmds'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1722: in function '_on_attach'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1472: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue

How to bind commands?

Hi! first of all - thanks for creating this plugin. I arrived at it exactly for the same problem - every time I need to setup my nvim environment, lsp saga is broken for different reasons, I just cant afford wasting time on that over and over. Looking forward to try LspUI.

I am not an advanced nvim+lua user, I coudln't figure out how to bind commands from your docs. Could you give me an example, lets say how to bind code_actions command to <leader>ca?

Thank you!

Enhance

This issue list some feature should be added or enhanced.

  • CallHierarchy (But I don't know what the UI should be)
  • code_action preview (waht the UI should be)
  • rename preview (what the UI should be)
  • new_hover (now, neovim's builtin hover highlight is not stable, when it is stable, I will switch the new highligtht)
  • More efficient jump-history implementation (now is using tagstack)
  • keybinding store and restore

Regarding design principles, you can read here, #12

Reflactor

I created this plugin just because I needed a stable lsp plugin (didn't follow many specifications), now I want to refactor the logic of the entire code and add new features

Some real-world testing is required before merging

Here are the features I think need to be added:

If you can see this issue, you can discuss what features need to be added!!

Features that have been refactored:

note:

The following are all completed

code action should provide registration method, for lua's code action
diagnostic should provide a diagnostic overview of the current workspace and files

Problems:

the keymap only will remove, we should restore keymap

Replace deprecated APIs

  • vim.api.nvim_get_option replace use nvim_get_option_value
  • vim.lsp.get_active_clients replace use get_clients
  • vim.lsp.util.trim_empty_lines replace use vim.split (At present, it seems that it is not possible to achieve the effect of only clearing the first and last blank lines through vim split.)

codeactions arent triggered by pressing numbers

Codeactions show a numbered list beside each action, and in other plugins (and even by default if I remember correctly) you can jump to and/or select an item by pressing that number, but as far as I can tell, pressing numbers has no effect when using this plugin.

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.