Skip to content

Neovim migration — Phase 6: Treesitter and completion (nvim-cmp) #72

Description

@mattmenefee

Blocked by


Adopt nvim-treesitter for syntax highlighting and structural editing, and nvim-cmp for completion.

Depends on: Phase 3 (lazy.nvim required). Recommended after Phase 4 so LSP is available as a completion source.

Changes

Treesitter

  • Add nvim-treesitter/nvim-treesitter with parsers for: ruby, javascript, typescript, tsx, html, scss, yaml, markdown, lua, vim, vimdoc, bash, dockerfile, terraform, python
  • Add nvim-treesitter/nvim-treesitter-textobjects for richer text objects
  • Drop these syntax/ftplugin plugins (treesitter handles them):
    • pangloss/vim-javascript
    • jelera/vim-javascript-syntax
    • mtscout6/vim-cjsx
    • mxw/vim-jsx (and let g:jsx_ext_required = 0)
    • vim-coffee-script (if Phase 3 didn't already remove it)

Completion

  • Add hrsh7th/nvim-cmp with sources: cmp-nvim-lsp, cmp-buffer, cmp-path
  • Remove Plugin 'ervandew/supertab' (nvim-cmp handles <Tab> completion) Already removed in Neovim migration — Phase 1: Minimum cutover from MacVim #67 — was incompatible with Neovim 0.12's Lua-callback default mappings. This means there is no tab completion at all until this phase lands.
  • Optional: replace Raimondi/delimitMate with windwp/nvim-autopairs (integrates with nvim-cmp)

Acceptance

  • Ruby/JS/etc. syntax highlighting visibly richer than current Vimscript regex highlighting
  • <Tab> triggers completion menu sourced from LSP/buffer/path
  • :TSUpdate keeps parsers fresh
  • Legacy syntax plugins removed

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions