Movatterモバイル変換


[0]ホーム

URL:


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

Improve Typescript React support#9

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Arelav wants to merge1 commit intosuy:master
base:master
Choose a base branch
Loading
fromArelav:patch-1

Conversation

@Arelav
Copy link
Contributor

I use vim-coc and looks like it sets filetype typescriptreact for tsx files.
Anyways I'm keeping previous functionality just in case somebody used it. For my current setup the implementation is much simple.

let g:context#commentstring#table['typescriptreact'] = {      \ 'tsxRegion': '{/*%s*/}'      \}

I use vim-coc and looks like it sets filetype typescriptreact for tsx files.Anyways I'm keeping previous functionality just in case somebody used it. For my current setup the implementation is much simple.```let g:context#commentstring#table['typescriptreact'] = {      \ 'tsxRegion': '{/*%s*/}'      \}```
@Arelav
Copy link
ContributorAuthor

👋

@suy
Copy link
Owner

suy commentedJun 11, 2021

Hi.

Thank you for the patch, and sorry for not replying before. I don't use vim so heavily nowadays, and certainly I don't do HTML stuff, pretty much at all. I wasn't already confident with the patch I accepted before, and even less with this one (because I don't know how to test it, and I'm quite confused with the technologies).

Do you mind if I ask you a few questions? It's fine if you don't know them all.

  1. You added support for a new file type, but did the others need change, or you did so as a cleanup?
  2. Is there any difference between typescript.tsx and typescript.jsx?
  3. What's different between typescriptreact and the others? Why you only need one syntax region?

Thank you.

@suy
Copy link
Owner

suy commentedJun 15, 2021

While this can't be merged now due to the conflicts (I've pushed some changes), let me know which syntax highlighting are using, and I'll look into fixing this myself if you don't find the time.

I'm struggling to find out which syntaxes might be the most popular ones to ship defaults here. Although I'm also considering that I should leave this to users to extend themselves in their config (it's just a line of code to extend the variable), because if there are too many different options, it's just not going to work well. Each user will need to adjust to their syntax.

@Arelav
Copy link
ContributorAuthor

Arelav commentedJun 15, 2021
edited
Loading

Sorry. I have seen your message but had no time to immediately respond.
The different file types for Javascript/Typescript react files come from different plugins users can install for Typescript support.

Like:

sheerun/vim-polyglot
leafgarland/typescript-vim
dense-analysis/ale
neoclide/coc.nvim
I used different combinations so you can track changes in my previous PR. It would be nice to have some simple solution however many people can use different setups.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Arelav@suy

[8]ページ先頭

©2009-2025 Movatter.jp