Need help with nim.nvim?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

alaviss
111 Stars 14 Forks ISC License 175 Commits 12 Opened issues

Description

Nim plugin for NeoVim

Services available

!
?

Need anything else?

Contributors list

# 61,775
Nim
Ada
luajit
procedu...
163 commits
# 42,638
Nim
procedu...
macros
SQLite
5 commits
# 248,256
Perl
Nim
Shell
complet...
3 commits
# 115,077
Nim
C++
procedu...
macros
1 commit
# 33,882
Nim
video-d...
Courser...
sqlite3
1 commit
# 86,502
Nim
lua-bin...
luajit
forth
1 commit

Nim language plugin for NeoVim

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

CI

asciicast

Requirements

  • neovim >= 0.4.3
  • nim >= 0.20 (choosenim can be used to install this version)

Installation

Features

  • Semantic highlighting with nimsuggest. Highlight as you type (experimental)
  • "Go to Definition" support using nimsuggest.
  • Autocompletion using nimsuggest.
  • Find references to a symbol.
  • Get signature and documentation of a symbol.
  • 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)})}
    \ })
Support for different completion plugins

While

prabirshrestha/asyncomplete.vim
is the most tested plugin for use with

nim.nvim
, it's worth noting that this plugin was made to support a wide range of completion plugins.

If your favorite completion plugin supports asynchronous completion sources in vimscript, the functions in

autoload/nim/suggest/sug.vim
can be used to integrate nim.nvim with it. Details on how to do so differs between plugins, so please refer to your completion plugin's documentations.

See Support for other completion plugins for pre-made configuration snippets for other plugins.

If you have any questions, you can find me in the

#nim
IRC channel under the handle

leorize
.

Usage

See the project's wiki for more information.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.