Comments (7)
TSServer has a lot of actions.
Tomorrow morning I'll try your branch.
from nvim-lspfuzzy.
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.
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.
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.
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.
Almost perfect.
One side note, if there are no actions, I would print a message.
from nvim-lspfuzzy.
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)
- Error expected table, got number when doing vim.lsp.buf.declaration HOT 3
- code action not works HOT 6
- Code action text missing sometimes (tsserver) HOT 4
- fzf doesn't scroll preview to actual position HOT 5
- Upstream workspace/applyEdit signature change breaks lspfuzzy HOT 5
- Expected table, got string error when calling vim.lsp.buf.definition() HOT 1
- Reopen the last results HOT 1
- Actions in fzf broken on nvim nightly HOT 3
- Feature request: Adding support for tab drop HOT 3
- call lua function in action HOT 5
- let functional actions be the last callbacks to be called with selected items HOT 2
- @ojroques okay I am noticing that even after calling the action function, it automatically sets the qflist and opens that split, which defeats the purpose of my qf_list function. I we can let action take complete control over what happens with the selections, which makes it more like the last callback.
- switch to nvim-lua HOT 1
- breaking changes on neovim master HOT 1
- Why is codeaction not supported? HOT 2
- No error message shown in :LspDiagnostics command HOT 1
- Feature Request: Severity color in LspDiagnostics HOT 2
- 'textDocument/codeAction' not support? HOT 1
- Make work with fzf-lua
- Error when try to sink the fzf-result to quickfix window: set_qlist(a nil val) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-lspfuzzy.