Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump vscode-textmate-languageservice from 0.2.1 to 1.1.0 #174

Merged
merged 17 commits into from
Feb 26, 2023
Merged

Bump vscode-textmate-languageservice from 0.2.1 to 1.1.0 #174

merged 17 commits into from
Feb 26, 2023

Conversation

zm-cttae-archive
Copy link
Contributor

@zm-cttae-archive zm-cttae-archive commented Jan 27, 2023

This is a full rewrite of the library that kills all tech debt, perf issues, and also adds browser support.

All providers exit within 100ms except for the definition provider which takes 1200ms. Not perfect but we've cut overheads by 1-2 orders of magnitude!
3 running theories for improvements.. mainly putting a stack variable for variable-property text merging in the tokenizer, & coalescing output data further to kill any overhead.

Not sure we are at the finish line here, but this will close a bunch of issues for sure.

These issues had regression test cases built to test them.. definitely killed these bugs 😄

If the changelogs interest you... 1.0.0-rc-1 and 1.0.0-rc-2

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Jan 28, 2023

Testing: extension is fully tested (vsce package) on my local machine, and via npm test against the library's test suite.

If you would like browser support, we can now enable it. But we'd need to conditionally kill features

@zm-cttae-archive zm-cttae-archive changed the title Bump vscode-textmate-languageservice from 0.2.1 to 1.0.0-rc-2 Bump vscode-textmate-languageservice from 0.2.1 to 1.0.0 Jan 29, 2023
@zm-cttae-archive zm-cttae-archive changed the title Bump vscode-textmate-languageservice from 0.2.1 to 1.0.0 Bump vscode-textmate-languageservice from 0.2.1 to 1.0.2 Jan 29, 2023
@zm-cttae-archive zm-cttae-archive changed the title Bump vscode-textmate-languageservice from 0.2.1 to 1.0.2 Bump vscode-textmate-languageservice from 0.2.1 to 1.0.0 Jan 29, 2023
@jankap
Copy link

jankap commented Feb 2, 2023

This is awesome! Big question: will @Gimly merge this or not in the future? Can I try this out on my PC already?

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Feb 2, 2023

Run it in PWSH for Windows or your bash console on Unix:

$ cd ~/.vscode/extensions/gimly81.matlab-2.*
$ npm i [email protected]

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Feb 2, 2023

Shoot... you will have to clone this out, npx vsce package then install the VSIX file.
https://gitlab.com/SNDST00M/vscode-textmate-languageservice/-/blob/main/CHANGELOG.md#100-rc-1

"Significant changes to the shape of the API exports."

@jiecui
Copy link

jiecui commented Feb 15, 2023

Huge thanks!!
However, after upgrading to 1.0.0, mlint does not appear to work anymore.

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Feb 16, 2023

Did you upgrade via npm i, or did you clone my repository and rebuild the extension? There are some changes to the way the LSP is initialised.. hopefully for the last time but yeah

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Feb 19, 2023

Hack to fix vscode-matlab performance for yourself

Put all these commands in the console:

$ git clone https://github.com/Gimly/vscode-matlab.git
$ cd vscode-matlab
$ git submodule update --init
$ npm install npm-run-all --save-dev
$ vsce package
$ code --install-extension matlab-2.3.1.vsix
$ cd ..

(Colourization is fixed in the snippet now)

@jiecui
Copy link

jiecui commented Feb 21, 2023

Sorry for the late reply. Thanks a lot for the comments!
All the above commands were executed successfully, but mlint problem persisted. In addition, the editor also lost colorization of some of the code. I switched to Matlab extension older version v2.0.0, which works all right.

@zm-cttae-archive
Copy link
Contributor Author

I am downloading a fresh purchased copy of Matlab to debug today

@zm-cttae-archive
Copy link
Contributor Author

Works for me:

image

@jiecui
Copy link

jiecui commented Feb 22, 2023

Thanks! Probably, the issue is at my end. How can I remove Xavier Hahn's Matlab extension completely and try a fresh start?

@zm-cttae-archive
Copy link
Contributor Author

code --install-extension matlab-2.3.1.vsix should have done it 🤔

@jiecui
Copy link

jiecui commented Feb 23, 2023

Still doesn't work well for me after a complete re-installation, but I guess the issue should be at my end. Thanks anyway!

image

@zm-cttae-archive zm-cttae-archive changed the title Bump vscode-textmate-languageservice from 0.2.1 to 1.0.0 Bump vscode-textmate-languageservice from 0.2.1 to 1.1.0 Feb 24, 2023
@zm-cttae-archive
Copy link
Contributor Author

We now have web support! Better than Anycode 🎁❣

@zm-cttae-archive
Copy link
Contributor Author

@jiecui go to github.dev/jiecui/mpact - please install [EXPERIMENTAL] Matlab extension and try it.

@jiecui
Copy link

jiecui commented Feb 26, 2023

Nice!

@Gimly Gimly merged commit e71fd80 into Gimly:master Feb 26, 2023
@zm-cttae-archive zm-cttae-archive deleted the hotfix-lsp-perfs branch February 26, 2023 09:55
@eluum
Copy link

eluum commented Mar 3, 2023

I have not been able to get this working for vscode on windows, seems like I have the same issue as @jiecui based on his screenshot. Building and installing the package from the cloned repo doesn't seem to work, using the version in the vscode extension Marketplace works but lags too much to be usable.

@zm-cttae-archive
Copy link
Contributor Author

zm-cttae-archive commented Mar 3, 2023

Riiight.. you've got to do git submodule update --init to have the grammar.

EDIT: I updated the comment w/ instructions for local fix - #174 (comment).


@Gimly you'll need to do npm i npm-run-all --save-dev and commit the new dependency to fix the build..

@eluum
Copy link

eluum commented Mar 4, 2023

Thanks, everything is working now. Great job making this extension usable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment