ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • vim-polyglot / coc.nvim
    development/general 2020. 3. 19. 06:49

    vim-polyglot

    Adding plugins for new language support is always cumbersome. I had these among many other plugins:

    Plugin 'pangloss/vim-javascript'
    Plugin 'kchmck/vim-coffee-script'
    Plugin 'chemzqm/vim-jsx-improve'
    Plugin 'leafgarland/typescript-vim'
    Plugin 'peitalin/vim-jsx-typescript'
    Plugin 'cakebaker/scss-syntax.vim'
    Plugin 'gcorne/vim-sass-lint'
    Plugin 'rust-lang/rust.vim'
    Plugin 'racer-rust/vim-racer'
    Plugin 'elixir-lang/vim-elixir'
    Plugin 'udalov/kotlin-vim'

    I'm probably late to the game but just stumbled upon vim-polyglot, a language support packs for vim that supports almost all the major programming languages. The thing I like about it the most is that it didn't reinvent the wheels, it rather integrated all the existing plugins.

    Plugin 'sheerun/vim-polyglot'

    One liner ftw!

     

    coc.nvim

    I've been using YouCompleteMe for code completion, I didn't dislike it but also like it because I didn't expect much functionality from it. coc.nvim is a "intelisence engine" for vim and neovim that includes tons of funcitionalities and customizing feature.

    After setting it up, I configured only one option for TypeScript that highlights the unknown type of props and variables.

     

    I don't to see undefined type suggestions / warnings

     

    coc.nvim has it's own configuration file ~/.vim/coc-settings.json and it's the same type as VSCode (jsonc). I added a line to turn off suggestion:

    {
      "typescript.suggest.enabled": false,
    }

    It's not neatly formatted like the other GUI code editors but it shows enough infomation by opening a side window as the cursor moves in the suggestion window:

     

     

    Still got stuff to figure out

    It seems both of them works great at the moment. But the ultimate issue hasn't been solved yet. Vim on MacOS is slower than Linux because of the terminal rendering. I moved from iTerm2 to Alacritty (It helped a lot) and set lazyredraw and some other options as well, but it's still slow. Mainly, syntax highlighting slows it down quite a lot but I don't want to turn it off or simplify it. Hope I can figure out how to optimize is or find a faster terminal soon.

    댓글 0

Leon Kim / mov eax, 4