News for hackers. Stuff that matters.
Re:Onivim 2: Lightweight, Modal Code Editor by mttrms on Wednesday June 24, 2020 @10:52AM (#23628486)
I love Vim, but since I started working in TypeScript/React every day it is basically unusable (syntax highlighting / code formatting cannot match VSCode) so I'm now running VSCode + Vim extension which is kinda meh, but serviceable.

One of these days I will get around to contributing to a Vim plugin or two to help improve Typescript / TSX support.

Re:Onivim 2: Lightweight, Modal Code Editor by 7786655 on Wednesday June 24, 2020 @04:22PM (#23633390)
I've had a different experience. Neovim + coc-tsserver and a syntax highlighting plugin works really well, and VSCode + Vim extension is unbelievably slow on my machine.
Re:Onivim 2: Lightweight, Modal Code Editor by mttrms on Wednesday June 24, 2020 @05:40PM (#23634188)
Which syntax highlighting plugin(s) are you using? Do you have syntax highlighting for functional components/hooks in .tsx files / can you share a config? Would love to give it a try.

I have spent many hours trying to get that work with no success. I've searched public .vimrc configs on github using typescript plugins and none of them gave me any type of syntax highlighting that compared to VSCode.

Re:Onivim 2: Lightweight, Modal Code Editor by 7786655 on Wednesday June 24, 2020 @08:29PM (#23635458)
I haven't used VSCode enough to consider myself knowledgeable about it's syntax highlighting or auto-indentation, so caveat emptor.

I use CoC.nvim using the coc-tsserver plugin to get Typescript completion/jump to definition etc, ALE to get ESLint warnings, HerringtonDarkholme/yats.vim (A Typescript syntax, Neovim comes bundled with this, but the bundled version might be out of date), and maxmellon/vim-jsx-pretty for JSX syntax highlighting and indentation (vim-jsx-pretty's auto indentation is not 100%, but it works well enough).

My colorscheme is tomasiser/vim-code-dark, in case that matters. Example screenshot: https://i.imgur.com/6UzKtU2.png

Re:Onivim 2: Lightweight, Modal Code Editor by mttrms on Wednesday June 24, 2020 @11:34PM (#23636629)
Thanks for sharing! My current setup is:

Plug 'HerringtonDarkholme/yats.vim'

Plug 'mhartington/nvim-typescript', { 'do': './install.sh' }

Plug 'pangloss/vim-javascript'

Plug 'maxmellon/vim-jsx-pretty'

Not too far off, but different.

I'll adjust a bit and see how it looks on some production code.

Re:Onivim 2: Lightweight, Modal Code Editor by lefrenchy on Thursday June 25, 2020 @01:12AM (#23637133)
I’ve had success with my config, it’s kind of large and i’m slowly slimming it down. But maybe it will help.

https://github.com/monsonjeremy/dotfiles/tree/master/config/...