Skip to content

Filetype *.tsx doesn't belong in this plugin #110

Closed
@kballenegger

Description

@kballenegger

I load my plugins with Pathogen, meaning they're loaded in alphabetical order. This plugin detects TSX like so:

autocmd BufNewFile,BufRead *.ts,*.tsx setlocal filetype=typescript

ianks/vim-tsx detects TSX like so:

autocmd BufNewFile,BufRead *.tsx set filetype=typescript.tsx

Since this plugin's autocmd detection can be run after the tsx plugin is loaded, it effectively sets the wrong filetype to typescript instead of typescript.tsx.

In my opinion, this plugin shouldn't try to work on TSX files. Let the TSX plugin do that. But if y'all don't agree, at least try to detect whether the TSX plugin is loaded and only handle *.tsx files if it is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions