Skip to content
Nim plugin for NeoVim
Branch: master
Clone or download
alaviss indent/nim: give pragmas special treatment
The case where:

  proc(a,
       b) {.pragma.} =
    ^

should now produce indent that places the cursor at the marked position
Latest commit a3e79f8 May 24, 2019

readme.md

Nim language plugin for NeoVim

This plugin is still pretty much a work-in-progress.

Test Status

asciicast

Requirements

  • neovim >= 0.3.0 (nimsuggest integration requires TCP byte sockets)
  • Latest development version of nimsuggest (--autobind is required, you can use choosenim to install this version)

Note: The current stable version (0.19.x) will not work with this plugin.

Installation

Features

  • Semantic highlighting with nimsuggest. Highlight as you type (experimental)
  • "Go to Definition" support using nimsuggest.
  • Autocompletion using nimsuggest.
  • Section movements!
  • NEP-1 style indentation!
  • And more...

Auto completion

Install prabirshrestha/asyncomplete.vim and configure it to your liking.

Add this to your configuration file to register the autocomplete source:

au User asyncomplete_setup call asyncomplete#register_source({
    \ 'name': 'nim',
    \ 'whitelist': ['nim'],
    \ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
    \ })

Usage

See the project's wiki for more information.

You can’t perform that action at this time.