Various hover improvements (#5617)

* Show more info on hover for variables

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Move hover impls to lsp module

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Test the new hovers; fix signature syntax

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Hover tips for kwargs

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-03-04 22:53:31 +13:00
committed by GitHub
parent 6e57a80c13
commit df278c7e6a
200 changed files with 7888 additions and 4459 deletions

View File

@ -1,5 +1,5 @@
---
source: kcl/src/simulation_tests.rs
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing sketch_on_face_end.kcl
---
{
@ -82,8 +82,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 94,
"name": "end",
"start": 91,
"type": "Identifier"
},
"arg": {
"elements": [
@ -130,8 +132,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 124,
"name": "end",
"start": 121,
"type": "Identifier"
},
"arg": {
"elements": [
@ -178,8 +182,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 154,
"name": "end",
"start": 151,
"type": "Identifier"
},
"arg": {
"elements": [
@ -400,8 +406,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "length"
"end": 245,
"name": "length",
"start": 239,
"type": "Identifier"
},
"arg": {
"end": 250,
@ -538,8 +546,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 337,
"name": "end",
"start": 334,
"type": "Identifier"
},
"arg": {
"elements": [
@ -590,8 +600,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 362,
"name": "end",
"start": 359,
"type": "Identifier"
},
"arg": {
"elements": [
@ -642,8 +654,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "end"
"end": 387,
"name": "end",
"start": 384,
"type": "Identifier"
},
"arg": {
"elements": [
@ -721,8 +735,10 @@ description: Result of parsing sketch_on_face_end.kcl
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "length"
"end": 433,
"name": "length",
"start": 427,
"type": "Identifier"
},
"arg": {
"end": 437,