Comments (2)
Yeah, we could add a lsp:goto-definition-under-cursor
command.
Adding something like this to your user module should work for now:
local core = require "core"
local command = require "core.command"
local keymap = require "core.keymap"
local lsp = require "plugins.lsp"
command.add(
function()
local dv = core.active_view
return dv and dv.doc and dv.doc.lsp_open, dv and dv.doc or nil
end, {
["lsp:goto-definition-under-cursor"] = function()
local doc, line, col = lsp.get_hovered_location(core.root_view.mouse.x, core.root_view.mouse.y)
if doc then
lsp.goto_symbol(doc, line, col)
end
end,
})
keymap.add({
["ctrl+1lclick"] = "lsp:goto-definition-under-cursor",
})
from lite-xl-lsp.
Perfect, this worked for me. Thanks!
from lite-xl-lsp.
Related Issues (20)
- No feedback when definition doesn't exist. HOT 2
- Rendering issues for inline diagnostics HOT 7
- Julia support HOT 3
- [Bug] Error windows cover right click context menu with no way to make the context menu visible again.
- [Bug] Autocomplete insertions randomly happen twice
- [Bug] Autocomplete insertions don't work for multiple cursors
- [BUG] Cannot see LSP Tooltip because warning/error tooltip covers it.
- [BUG] LSP Sees completely different input than what's being shown in the editor. HOT 1
- `util.doc_is_open` preforms case sensitive comparisent on windows HOT 3
- Add format on save
- clangd cannot find my compile_commands.json HOT 8
- Error? trying to run gopls.exe HOT 11
- [Bug] High CPU usage after closing file, with "stop_unneeded_servers" set to "true" HOT 9
- [Error] Attempted to index a nil value (field 'proc') HOT 22
- [Bug] Wrong line number gets sent to the LSP server, resulting in errors HOT 16
- Autocomplete entries need to be truncated HOT 1
- allow overriding PATH HOT 3
- Formatting fails with pylsp HOT 12
- [Request] Easier configuring LSP server after initialization HOT 3
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 lite-xl-lsp.