Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vscode addon for formatting and highlighting #81

Natejoestev started this conversation in Ideas
Discussion options

it would be nice if you made a vscode addon for Nilesoft Shell Script (.shl).
it would add simple text highlighting and support for:

  • collapsing {...} and multi-line items
  • maybe IntelliSense

(also, it would be nice if you had a discord server👍)

You must be logged in to vote

Replies: 15 comments 35 replies

Comment options

i'm looking into it and i think i might beable to do it myself.

You must be logged in to vote
0 replies
Comment options

This would be a really great contribution

You must be logged in to vote
0 replies
Comment options

Hi, I've made a vscode extension for that. With a grammar, if you wanna try.
I'm new to this, but it seems to work well :-)
Screenshot 2023年05月25日 142811

Folding works, comments and hightlighting of some elements is supported.

I can give you the code if you want to use it as a starter.

vsix extension file

You must be logged in to vote
3 replies
Comment options

This is a really great contribution

Comment options

You can add this extension to the vscode folder inside the extensions folder

Comment options

I don't have rights to create a branch.

Comment options

nice, i will use that.

You must be logged in to vote
0 replies
Comment options

Fixed variables not colored:
updated vsix extension

Also added snippets (me/it) for menu/item

You must be logged in to vote
9 replies
Comment options

i understand what you did.
the file extension is not .nss it's .shl

Comment options

line 22, change to .shl in package.json

Comment options

You mean the extensions of files for nilesoft shell ?
I think it is .nss because it is what is specified in documentation and also in the example files delivered by the setup : Doc
By the way, you can switch to nilesoft in the vscode state bar even if it is the wrong extension no ?

Comment options

@ChristopheL77 the newest versions 0.0.5 and 0.1.0 don't do anything. I can't get the old ones, link expired

Sorry for expired links. I thought I could put it in github but I can't create a branch right now.

Comment options

I published it on the market place, you should be able to install it from vscode now

image

Comment options

that is weird, my nilesoft download has shell.shl as the file.
also, i found a bug when you have smth like a='@myFnc("b")' it doesn't like the quotes or smth.

You must be logged in to vote
6 replies
Comment options

i found a bug when you have smth like a='@myFnc("b")' it doesn't like the quotes or smth.

Yes I didn't find a regular expression to match these expressions because nss language allows to break item/menu properties into multiple lines mixed with properties in same line and there is not an end of statement char as far as I know. I'm still trying though ;)
I mean we can do

menu(prop1=abc())
menu(prop1=abc()
prop2=def
)
menu(prop1=abc(aa()) prop2=def
)
menu(prop1=abc prop2=def()
)

And I have to identity the last parenthesis to know where the menu properties ends.

Here, the right parenthesis may be interpreted as the end of menu or item properties that's why it doesn't highlight well after.

Comment options

i have 1.7 rn. how do i update it?

Comment options

winget update nilesoft.shell

Or others methods : https://nilesoft.org/download
Backup your config files before if you updated them.

Comment options

could you add the nilesoft icon to the file extension?

Comment options

i found a bug when you have smth like a='@myFnc("b")' it doesn't like the quotes or smth.

I think it is fixed now in v1.1.0
I learned about regular expression recursion ;-)

Comment options

Yes if @moudey allows me to use his icon.

You must be logged in to vote
4 replies
Comment options

Yes you can

Comment options

Cool ;). Updated in v1.0.1

Comment options

that is not what i meant. i meant for the files so you can see that they are nilesoft shell files instead of just this:
image

Comment options

Done in 1.2.0 ;)

Comment options

Added basic completion in 1.3.0

image

image

You must be logged in to vote
5 replies
Comment options

Updated to 1.5.0 with autocompletion with documentation (based on nilesoft doc)

Comment options

@ChristopheL77 i would like to get access to the extension repo so i can fix some things.

Comment options

What do you want to fix ?
Send me your email address so I can add you to project.

Comment options

are you in the nilesoft discord?
also, i don't think you need an email, you can enter username, full name, or email.
just use my username @Natejoestev

Comment options

unless your planning to add me as a contributor to the marketplace.

Comment options

Repo is not in github Le lun. 11 déc. 2023, 02:20, Natejoestev ***@***.***> a écrit :
...
unless your planning to add me as a contributor to the marketplace. — Reply to this email directly, view it on GitHub <#81 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD6PDPHFPDWTS5LI74IR3SDYIZNXXAVCNFSM6AAAAAAYOYY6GOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TQMJUGUZTI> . You are receiving this because you were mentioned.Message ID: ***@***.***>
You must be logged in to vote
2 replies
Comment options

can we talk on discord?

Comment options

my username is @natejoestev

Comment options

Check out my Notepad++ theme for Shell & Python: https://discord.com/channels/1106387012707168318/1241063722449899712

You must be logged in to vote
0 replies
Comment options

@ChristopheL77 do you plan make the NS vscode extension even better?

You must be logged in to vote
0 replies
Comment options

Hi, Not really. What do you need ? Le mar. 10 déc. 2024, 17:48, RubicBG ***@***.***> a écrit :
...
@ChristopheL77 <https://github.com/ChristopheL77> do you plan make the NS vscode extension even better? — Reply to this email directly, view it on GitHub <#81 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD6PDPH3BTOCDCKTJHXCFK32E4LPBAVCNFSM6AAAAABTLTEHLGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNJSGM3DENA> . You are receiving this because you were mentioned.Message ID: ***@***.***>
You must be logged in to vote
0 replies
Comment options

Тhanks to text highlighting the code is easily recognizable - without it it would be much more difficult - very good job. But I personally use regex, reg paths, ps commands ... - sometimes they make highlighting "stop" for a few lines, or change the coloring, some new commands are not colored, auto-completion only works on basic commands ... definitely many things can be improved. If you decide to work on improving the extension I would like to help

You must be logged in to vote
0 replies
Comment options

Thanks. I know it is perfectible. It is textmate based. I did that as a hobby. To go further, I think we would need a language server but I don't have time for this. I can give you access to source code, it is hosted on azure devops (I need an email address). Christophe Le mar. 10 déc. 2024, 19:09, RubicBG ***@***.***> a écrit :
...
Тhanks to text highlighting the code is easily recognizable - without it it would be much more difficult - very good job. But I personally use regex, reg paths, ps commands ... - sometimes they make highlighting "stop" for a few lines, or change the coloring, some new commands are not colored, auto-completion only works on basic commands ... definitely many things can be improved. If you decide to work on improving the extension I would like to help — Reply to this email directly, view it on GitHub <#81 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD6PDPGQ7XAQJIMOVQO3MHL2E4U7PAVCNFSM6AAAAABTLTEHLGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNJSGQ2DAMA> . You are receiving this because you were mentioned.Message ID: ***@***.***>
You must be logged in to vote
1 reply
Comment options

RubicBG Dec 11, 2024
Collaborator

I won't have time in the next few months. I'll need time to get familiar with azure devops and the extension structure before I start changing anything on my own. You can add me to the project now or I'll write to you again when I have time to take on the project more seriously. Find me in discord with the same name (I don't want to use the program page as a general chat)

Comment options

This is really awesome. How difficult would it be to release this as a syntax definition package for Sublime Text?

You must be logged in to vote
5 replies
Comment options

I don't know at all. I never used sublime nor did an extension for it. Sorry.

Comment options

Is your extension open source? If so I'd be happy to fork and port it over to sublime text for those of us who don't use vscode

Comment options

I can give you access to source code, it is hosted on azure devops (I need an email address).

Comment options

Sure. Here is a throwaway email I use (to avoid publishing my primary): inthat650@gmail.com

Comment options

I will maintain one branch for editor-agnostic commits in case you'd like to merge any of them into your repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
Converted from issue

This discussion was converted from issue #68 on December 08, 2022 23:38.

AltStyle によって変換されたページ (->オリジナル) /