-
Notifications
You must be signed in to change notification settings - Fork 4
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
misc #35
misc #35
Conversation
Thank very much for your contribution! |
Applyied so far: (sorry for making this harder to rebase)
TODO
|
return 'c' | ||
end | ||
return syntax | ||
local map = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem correct to me. What is the reason for this?
- JavaScript uses
javascript
notjsx
- TypeScript uses
typescript
nottsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's a workaround for jsx/tsx
files which are a superset of javascript/typescript allowing for xml-like syntax for creating elements (used in react mostly). So rather than launching separate language servers for a ts and tsx file we just use one.
See also kakoune-lsp/kakoune-lsp#211
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My problem with this change is that. Someone configuring their setup may not know about the enforced mapping and tries to configure a language server for the correct syntax/languageID javascript
, which will not be picked up due to our mapping.
Maybe we can come up with a more generic solution for this.
Our solution should support setups that want to map all JS/TS files to JSX/TSX, ones that allow to separate both and ones that only want to configure servers for JS/TSX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, not sure of a clean solution as vis's filetype plugin only exposes *.tsx
files as typescript files
And as I said it's a superset and I don't think there's any other js/ts language server in active development that doesn't support jsx/tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution and the insights!
Applied as a2dc6b9.
My initial concern is invalid since we use the mapping only to determine the languageId
passed to the server not to select a language server configuration.
We can still think about a more generic/complex solution if someone encounters an issue with this mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for the _show_message
change?
I think it has worse UX than using vis:message
.
The new split window has to be forcefully closed using :q!
because it has unsaved changes.
Yeah it's just a personal thing. I felt vis:message output was harder to follow as there was no highlighting and the previous output was clubbed together. |
@git-bruh let me know what you think about https://gitlab.com/muhq/vis-lspc/-/merge_requests/49. I tried to make the way messages are presented configurable. |
Thanks for your contribution. |
Hey, I've been maintaining a fork of vis-lspc to adapt it to my needs, just dropping this PR here so you can cherry pick any commits you might find useful. Most commits are atomic, some changes:
fzy
vis:pipe
refactors to usevis:pipe_buffer
, as I noticed theprintf
command construction breaking in large codebasesIf you'd be interested in having some of this upstream I can create individual PRs
Thanks a lot for creating this project!