Code Monkey home page Code Monkey logo

Comments (7)

lucax88x avatar lucax88x commented on May 20, 2024 1

TSServer has a lot of actions.

Tomorrow morning I'll try your branch.

from nvim-lspfuzzy.

lucax88x avatar lucax88x commented on May 20, 2024

I am trying to do it myself, but I'm pretty newb with plugins in general, how can I source my luafile and overwrite handlers to test it?

from nvim-lspfuzzy.

ojroques avatar ojroques commented on May 20, 2024

The issue is that Neovim LSP does have a function to retrieve all diagnostics (vim.lsp.diagnostic.get()) but the handler associated to that function is used to display warnings/erros next to the code so we don't want to mess with that.

So this means we have to create our own command which would call vim.lsp.diagnostic.get() and process the results. It shouldn't be complicated, I'll do it this week or the next.

About code_action I don't really see the point of using FZF in that case. There is no location to jump to, there is just a list from which to select an action. It's quicker to type 2 to select action 2 than to use FZF I'd say. So it's not a priority but maybe I'll add a command after the one for diagnostics.

Check :h lsp-handler for creating your handlers and :lua-require for how lua files are sourced. Basically everything under <neovim config folder>/lua should be sourced.

from nvim-lspfuzzy.

lucax88x avatar lucax88x commented on May 20, 2024

Regarding diagnostic, Yeah, I think we could be fine by just providing a EX command that we can use in our remaps instead of using handlers.
Regarding actions, well, to me it happens to have also 10 actions to select from, and FZF can be helpful to filter quickly, and in general to have an unique "popup" system.

from nvim-lspfuzzy.

ojroques avatar ojroques commented on May 20, 2024

I'm working on both right now in branch dev you can try it out.

Diagnostics works fine, I've added :LspDiagnostics <bufnr> and :LspDiagnosticsAll commands.

I haven't tested code actions yet because my LSP servers don't support them. Can you suggest me a LSP server which have some code actions I can try?

from nvim-lspfuzzy.

lucax88x avatar lucax88x commented on May 20, 2024

Almost perfect.

One side note, if there are no actions, I would print a message.

from nvim-lspfuzzy.

ojroques avatar ojroques commented on May 20, 2024

I've merged dev into main, now the plugin supports diagnostics and code actions. I've also added some logs if there is no code actions or references etc.

from nvim-lspfuzzy.

Related Issues (20)

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.