Skip to content

Commit 2ed0bb6

Browse files
committed
[pre-release] v3.3.1-beta-5
- Snippets for built-in variables, functions and constants updated to Pinescript release March 2024. - Hover popup descriptions for overloaded functions added. - Color for notification center and terminal cursor fixed.
1 parent 8627706 commit 2ed0bb6

27 files changed

+2916
-2685
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
#### **3.3.1**
4+
5+
*18.04.2024 **Update***
6+
- Snippets for built-in variables, functions and constants updated to Pinescript release March 2024.
7+
- Hover popup descriptions for overloaded functions added.
8+
- Theme color minor fixed.
9+
10+
---
311
#### **3.3.0**
412

513
*18.02.2024 **Update***

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023-2024 salbert.g, LLC
3+
Copyright (c) 2023-2024 salbert.g
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
## Language support for Pine Script V5 with Syntax Highlighting & Snippets
55

66
## Release Notes
7-
#### **3.3.0**
7+
#### **3.3.1**
88

9-
*18.02.2024 **Update***
10-
- Integrated with PineScript Color Themes extension.
11-
- Hover popup fixed.
12-
- Grammars fixed.
9+
*18.04.2024 **Update***
10+
- Snippets for built-in variables, functions and constants updated to Pinescript release March 2024.
11+
- Hover popup descriptions for overloaded functions added.
12+
- Theme color minor fixed.
1313

1414
---
1515

@@ -150,4 +150,4 @@ This extension is released under the [MIT License](./LICENSE.md).
150150

151151
---
152152

153-
*Version 3.3.0*
153+
*Version 3.3.1*

SNIPPET-LIST.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*Version 3.2.2*
1+
*Version 3.3.1*
22
# Snippet's Prefix's
33

44
- [Snippet's Prefix's](#snippets-prefixs)
@@ -78,8 +78,8 @@
7878
|`strategy.eventrades` |
7979
|`strategy.grossloss` |
8080
|`strategy.grossprofit` |
81-
|`strategy.grossloss_percent` _**new!**_ |
82-
|`strategy.grossprofit_percent` _**new!**_ |
81+
|`strategy.grossloss_percent` |
82+
|`strategy.grossprofit_percent` |
8383
|`strategy.initial_capital` |
8484
|`strategy.long` |
8585
|`strategy.losstrades` |
@@ -91,11 +91,12 @@
9191
|`strategy.max_runup` |
9292
|`strategy.netprofit` |
9393
|`strategy.openprofit` |
94-
|`strategy.max_drawdown_percent` _**new!**_ |
95-
|`strategy.max_runup_percent` _**new!**_ |
96-
|`strategy.netprofit_percent` _**new!**_ |
97-
|`strategy.openprofit_percent` _**new!**_ |
94+
|`strategy.max_drawdown_percent` |
95+
|`strategy.max_runup_percent` |
96+
|`strategy.netprofit_percent` |
97+
|`strategy.openprofit_percent` |
9898
|`strategy.opentrades` |
99+
|`strategy.opentrades.capital_held` _**new!**_ |
99100
|`strategy.position_avg_price` |
100101
|`strategy.position_entry_name` |
101102
|`strategy.position_size` |
@@ -105,32 +106,33 @@
105106
|`syminfo.country` |
106107
|`syminfo.currency` |
107108
|`syminfo.description` |
108-
|`syminfo.employees` _**new!**_ |
109+
|`syminfo.employees` |
110+
|`syminfo.expiration_date` _**new!**_ |
109111
|`syminfo.industry` |
110112
|`syminfo.minmove` |
111113
|`syminfo.mintick` |
112114
|`syminfo.pointvalue` |
113115
|`syminfo.prefix` |
114116
|`syminfo.pricescale` |
115-
|`syminfo.recommendations_buy` _**new!**_ |
116-
|`syminfo.recommendations_buy_strong` _**new!**_ |
117-
|`syminfo.recommendations_date` _**new!**_ |
118-
|`syminfo.recommendations_hold` _**new!**_ |
119-
|`syminfo.recommendations_sell` _**new!**_ |
120-
|`syminfo.recommendations_sell_strong` _**new!**_ |
121-
|`syminfo.recommendations_total` _**new!**_ |
117+
|`syminfo.recommendations_buy` |
118+
|`syminfo.recommendations_buy_strong`|
119+
|`syminfo.recommendations_date` |
120+
|`syminfo.recommendations_hold` |
121+
|`syminfo.recommendations_sell` |
122+
|`syminfo.recommendations_sell_strong`|
123+
|`syminfo.recommendations_total` |
122124
|`syminfo.root` |
123125
|`syminfo.sector` |
124126
|`syminfo.session` |
125-
|`syminfo.shareholders` _**new!**_ |
126-
|`syminfo.shares_outstanding_float` _**new!**_ |
127-
|`syminfo.shares_outstanding_total` _**new!**_ |
128-
|`syminfo.target_price_average` _**new!**_ |
129-
|`syminfo.target_price_date` _**new!**_ |
130-
|`syminfo.target_price_estimates` _**new!**_ |
131-
|`syminfo.target_price_high` _**new!**_ |
132-
|`syminfo.target_price_low` _**new!**_ |
133-
|`syminfo.target_price_median` _**new!**_ |
127+
|`syminfo.shareholders` |
128+
|`syminfo.shares_outstanding_float` |
129+
|`syminfo.shares_outstanding_total` |
130+
|`syminfo.target_price_average` |
131+
|`syminfo.target_price_date` |
132+
|`syminfo.target_price_estimates` |
133+
|`syminfo.target_price_high` |
134+
|`syminfo.target_price_low` |
135+
|`syminfo.target_price_median` |
134136
|`syminfo.ticker` |
135137
|`syminfo.tickerid` |
136138
|`syminfo.timezone` |
@@ -472,12 +474,14 @@
472474
|`str.match` |
473475
|`str.pos` |
474476
|`str.replace` |
477+
|`str.repeat` _**new!**_ |
475478
|`str.replace_all` |
476479
|`str.split` |
477480
|`str.startswith` |
478481
|`str.substring` |
479482
|`str.tonumber` |
480483
|`str.tostring` |
484+
|`str.trim` _**new!**_ |
481485
|`str.upper` |
482486
|`strategy.cancel` |
483487
|`strategy.cancel_all` |
@@ -497,9 +501,9 @@
497501
|`strategy.closedtrades.max_drawdown` |
498502
|`strategy.closedtrades.max_runup` |
499503
|`strategy.closedtrades.profit` |
500-
|`strategy.closedtrades.max_drawdown_percent` _**new!**_ |
501-
|`strategy.closedtrades.max_runup_percent` _**new!**_ |
502-
|`strategy.closedtrades.profit_percent` _**new!**_ |
504+
|`strategy.closedtrades.max_drawdown_percent`|
505+
|`strategy.closedtrades.max_runup_percent` |
506+
|`strategy.closedtrades.profit_percent` |
503507
|`strategy.closedtrades.size` |
504508
|`strategy.convert_to_account` |
505509
|`strategy.convert_to_symbol` |
@@ -517,9 +521,9 @@
517521
|`strategy.opentrades.max_drawdown` |
518522
|`strategy.opentrades.max_runup` |
519523
|`strategy.opentrades.profit` |
520-
|`strategy.opentrades.max_drawdown_percent` _**new!**_ |
521-
|`strategy.opentrades.max_runup_percent` _**new!**_ |
522-
|`strategy.opentrades.profit_percent` _**new!**_ |
524+
|`strategy.opentrades.max_drawdown_percent`|
525+
|`strategy.opentrades.max_runup_percent` |
526+
|`strategy.opentrades.profit_percent` |
523527
|`strategy.opentrades.size` |
524528
|`strategy.order.block` |
525529
|`strategy.order` |

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"icon": "images/pineicon.png",
66
"publisher": "salbert11",
77
"license": "MIT",
8-
"version": "3.3.0",
8+
"version": "3.3.1-beta-5",
99
"engines": {
1010
"vscode": "^1.62.0"
1111
},

snippets/built-in_functions.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@
22772277
"request.financial ⇨ 𝑓": {
22782278
"prefix": "request.financial",
22792279
"body": [
2280-
"request.financial(symbol = ${1| ,syminfo.tickerid|}, financial_id = \"${2}\", period = ${3| ,\"TTM\",\"FY\",\"FQ\",\"FH\"|}${4:${5:, gaps = ${6| ,barmerge.gaps_off,barmerge.gaps_on|}}${7:, ignore_invalid_symbol = ${8| ,false,true|}}${9:, currency = ${10| ,syminfo.currency,currency.NONE,currency.AUD,currency.BTC,currency.CAD,currency.CHF,currency.ETH,currency.EUR,currency.GBP,currency.HKD,currency.INR,currency.JPY,currency.KRW,currency.MYR,currency.NOK,currency.NZD,currency.RUB,currency.SEK,currency.SGD,currency.TRY,currency.USD,currency.USDT,currency.ZAR|}}})"
2280+
"request.financial(symbol = ${1| ,syminfo.tickerid|}, financial_id = \"${2}\", period = ${3| ,\"TTM\",\"FY\",\"FQ\",\"FH\",\"D\"|}${4:${5:, gaps = ${6| ,barmerge.gaps_off,barmerge.gaps_on|}}${7:, ignore_invalid_symbol = ${8| ,false,true|}}${9:, currency = ${10| ,syminfo.currency,currency.NONE,currency.AUD,currency.BTC,currency.CAD,currency.CHF,currency.ETH,currency.EUR,currency.GBP,currency.HKD,currency.INR,currency.JPY,currency.KRW,currency.MYR,currency.NOK,currency.NZD,currency.RUB,currency.SEK,currency.SGD,currency.TRY,currency.USD,currency.USDT,currency.ZAR|}}})"
22812281
],
22822282
"description": "Requests financial series for symbol ⇨ 𝑓 | request.financial(symbol = string, financial_id = string, period = string, gaps = barmerge_gaps, ignore_invalid_symbol = bool, currency = string) → series float"
22832283
},
@@ -2387,6 +2387,13 @@
23872387
],
23882388
"description": "Position of 1st occurrence of string ⇨ 𝑓 | str.pos(source = string, str = string) → int"
23892389
},
2390+
"str.repeat ⇨ 𝑓": {
2391+
"prefix": "str.repeat",
2392+
"body": [
2393+
"str.repeat(source = ${1:\"${2}\"}, repeat = ${3}${4:, separator = ${5:\"${6}\"}})"
2394+
],
2395+
"description": "Constructs a new string containing the `source` string repeated `repeat` times with the `separator` injected between each repeated instance. ⇨ 𝑓 | str.repeat(source = string, repeat = int, separator = string) → string"
2396+
},
23902397
"str.replace ⇨ 𝑓": {
23912398
"prefix": "str.replace",
23922399
"body": [
@@ -2436,6 +2443,13 @@
24362443
],
24372444
"description": "String representation of the `value` argument else NaN ⇨ 𝑓 | str.tostring(value = any series, format = string) → string"
24382445
},
2446+
"str.trim ⇨ 𝑓": {
2447+
"prefix": "str.trim",
2448+
"body": [
2449+
"str.trim(source = ${1:\"${2}\"})"
2450+
],
2451+
"description": "Constructs a new string with all consecutive whitespaces and other control characters removed from the left and right of the `source`. ⇨ 𝑓 | str.trim(source = string) → string"
2452+
},
24392453
"str.upper ⇨ 𝑓": {
24402454
"prefix": "str.upper",
24412455
"body": [
@@ -3527,16 +3541,16 @@
35273541
"time ⇨ 𝑓": {
35283542
"prefix": "time",
35293543
"body": [
3530-
"time(timeframe = ${1| ,timeframe.period,'1','2','3','5','7','10','15','30','60','90','120','180','240','360','480','D','2D','5D','W','2W','M','2M','6M','Y'|}${2:, session = \"${3| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}-${4| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}\"${5:, timezone = ${6| ,syminfo.timezone,\"GMT-12\",\"GMT-11\",\"GMT-10\",\"GMT-9\",\"GMT-8\",\"GMT-7\",\"GMT-6\",\"GMT-5\",\"GMT-4\",\"GMT-3\",\"GMT-2\",\"GMT-1\",\"GMT+0\",\"GMT+1\",\"GMT+2\",\"GMT+3\",\"GMT+4\",\"GMT+5\",\"GMT+6\",\"GMT+7\",\"GMT+8\",\"GMT+9\",\"GMT+10\",\"GMT+11\",\"GMT+12\"|}}})"
3544+
"time(timeframe = ${1| ,timeframe.period,'1','2','3','5','7','10','15','30','60','90','120','180','240','360','480','D','2D','5D','W','2W','M','2M','6M','Y'|}${2:, session = \"${3| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}-${4| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}\"${5:, timezone = ${6| ,syminfo.timezone,\"GMT-12\",\"GMT-11\",\"GMT-10\",\"GMT-9\",\"GMT-8\",\"GMT-7\",\"GMT-6\",\"GMT-5\",\"GMT-4\",\"GMT-3\",\"GMT-2\",\"GMT-1\",\"GMT+0\",\"GMT+1\",\"GMT+2\",\"GMT+3\",\"GMT+4\",\"GMT+5\",\"GMT+6\",\"GMT+7\",\"GMT+8\",\"GMT+9\",\"GMT+10\",\"GMT+11\",\"GMT+12\"|}}${7:, bars_back = ${8}}})"
35313545
],
3532-
"description": "UNIX time of the current bar for the specified timeframe and session or NaN ⇨ 𝑓 | time(timeframe = string, session = string, timezone = string) → series int"
3546+
"description": "UNIX time of the current bar for the specified timeframe and session or NaN ⇨ 𝑓 | time(timeframe = string, session = string, timezone = string, bars_back = int) → series int"
35333547
},
35343548
"time_close ⇨ 𝑓": {
35353549
"prefix": "time_close",
35363550
"body": [
3537-
"time_close(timeframe = ${1| ,timeframe.period,'1','2','3','5','7','10','15','30','60','90','120','180','240','360','480','D','2D','5D','W','2W','M','2M','6M','Y'|}${2:, session = \"${3| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}-${4| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}\"${5:, timezone = ${6| ,syminfo.timezone,\"GMT-12\",\"GMT-11\",\"GMT-10\",\"GMT-9\",\"GMT-8\",\"GMT-7\",\"GMT-6\",\"GMT-5\",\"GMT-4\",\"GMT-3\",\"GMT-2\",\"GMT-1\",\"GMT+0\",\"GMT+1\",\"GMT+2\",\"GMT+3\",\"GMT+4\",\"GMT+5\",\"GMT+6\",\"GMT+7\",\"GMT+8\",\"GMT+9\",\"GMT+10\",\"GMT+11\",\"GMT+12\"|}}})"
3551+
"time_close(timeframe = ${1| ,timeframe.period,'1','2','3','5','7','10','15','30','60','90','120','180','240','360','480','D','2D','5D','W','2W','M','2M','6M','Y'|}${2:, session = \"${3| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}-${4| ,0000,0001,0015,0030,0045,0100,0115,0130,0145,0200,0215,0230,0245,0300,0315,0330,0345,0400,0415,0430,0445,0500,0515,0530,0545,0600,0615,0630,0645,0700,0715,0730,0745,0800,0815,0830,0845,0900,0915,0930,0945,1000,1015,1030,1045,1100,1115,1130,1145,1200,1215,1230,1245,1300,1315,1330,1345,1400,1415,1430,1445,1500,1515,1530,1545,1600,1615,1630,1645,1700,1715,1730,1745,1800,1815,1830,1845,1900,1915,1930,1945,2000,2015,2030,2045,2100,2115,2130,2145,2200,2215,2230,2245,2300,2315,2330,2345,2359,2400|}\"${5:, timezone = ${6| ,syminfo.timezone,\"GMT-12\",\"GMT-11\",\"GMT-10\",\"GMT-9\",\"GMT-8\",\"GMT-7\",\"GMT-6\",\"GMT-5\",\"GMT-4\",\"GMT-3\",\"GMT-2\",\"GMT-1\",\"GMT+0\",\"GMT+1\",\"GMT+2\",\"GMT+3\",\"GMT+4\",\"GMT+5\",\"GMT+6\",\"GMT+7\",\"GMT+8\",\"GMT+9\",\"GMT+10\",\"GMT+11\",\"GMT+12\"|}}${7:, bars_back = ${8}}})"
35383552
],
3539-
"description": "UNIX time of the close of the current bar for the specified resolution and session or NaN ⇨ 𝑓 | time_close(timeframe = string, session = string, timezone = string) → series int"
3553+
"description": "UNIX time of the close of the current bar for the specified resolution and session or NaN ⇨ 𝑓 | time_close(timeframe = string, session = string, timezone = string, bars_back = int) → series int"
35403554
},
35413555
"timeframe.change ⇨ 𝑓": {
35423556
"prefix": "timeframe.change",

snippets/built-in_variables_dictionnary.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,13 @@
552552
],
553553
"description": "Number of market position entries, which were not closed and remain opened. If there is no open market position, 0 is returned. | TYPE series int"
554554
},
555+
"strategy.opentrades.capital_held ⇨ 𝑥": {
556+
"prefix": "strategy.opentrades.capital_held",
557+
"body": [
558+
"strategy.opentrades.capital_held$0"
559+
],
560+
"description": "The capital amount currently held by open trades. | TYPE series float"
561+
},
555562
"strategy.position_avg_price ⇨ 𝑥": {
556563
"prefix": "strategy.position_avg_price",
557564
"body": [
@@ -622,6 +629,13 @@
622629
],
623630
"description": "The number of employees the company has. | TYPE simple int"
624631
},
632+
"syminfo.expiration_date ⇨ 𝑥": {
633+
"prefix": "syminfo.expiration_date",
634+
"body": [
635+
"syminfo.expiration_date$0"
636+
],
637+
"description": "A UNIX timestamp representing the start of the last day of the current futures contract. This variable is only compatible with non-continuous futures symbols. On other symbols, it returns na. | TYPE simple int"
638+
},
625639
"syminfo.industry ⇨ 𝑥": {
626640
"prefix": "syminfo.industry",
627641
"body": [

src/extension.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ type Params = {
99
};
1010

1111
type FuncPopupBlock = {
12-
id: number;
1312
pattern: string;
14-
codeblock: string;
13+
codeblock: string[];
1514
markdown: string;
1615
returns: string;
1716
manual: string;
1817
param: Params[];
1918
};
2019

2120
type ConstPopupBlock = {
22-
id: number;
2321
pattern: string;
2422
codeblock: string;
2523
markdown: string;
@@ -77,7 +75,11 @@ export function activate(context: vscode.ExtensionContext) {
7775
hoverRange = document.getWordRangeAtPosition(position, testPattern);
7876
if (hoverRange) {
7977
let popup = new vscode.MarkdownString('');
80-
popup.appendCodeblock(BUILT_IN_FUNC[index].codeblock);
78+
let codeBlockStr = BUILT_IN_FUNC[index].codeblock[0];
79+
for (let codeBlockCounter = 1; codeBlockCounter < BUILT_IN_FUNC[index].codeblock.length; codeBlockCounter++){
80+
codeBlockStr = codeBlockStr + "\n" + BUILT_IN_FUNC[index].codeblock[codeBlockCounter];
81+
}
82+
popup.appendCodeblock(codeBlockStr);
8183
if (BUILT_IN_FUNC[index].markdown !== ''){
8284
popup.appendMarkdown(BUILT_IN_FUNC[index].markdown);
8385
}

0 commit comments

Comments
 (0)