Code Monkey home page Code Monkey logo

nim.nvim's Introduction

Nim language plugin for NeoVim

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

Test Status

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.

nim.nvim's People

Contributors

alaviss avatar gradha avatar belamenso avatar federicoceratto avatar zevv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.