Giter Site home page Giter Site logo

vscode-nim's Introduction

Nim for Visual Studio Code

Version Installs Ratings Build Status

This extension adds language support for the Nim language to VS Code, including:

  • Syntax Highlight (nim, nimble, nim.cfg)
  • Code Completion
  • Signature Help
  • Goto Definition
  • Find References
  • File outline
  • Build-on-save
  • Workspace symbol search
  • Quick info

Using

First, you will need to install Visual Studio Code 0.10. In the command palette (cmd-shift-p) select Install Extension and choose Nim.

The following tools are required for the extension:

Note: It is recommended to turn Auto Save on in Visual Studio Code (File -> Auto Save) when using this extension.

Options

The following Visual Studio Code settings are available for the Nim extension. These can be set in user preferences (cmd+,) or workspace settings (.vscode/settings.json).

  • nim.buildOnSave - perform build task from tasks.json file, to use this options you need declare build task according to Tasks Documentation, for example:
     {
     	"taskName": "Run module.nim",
     	"command": "nim",
     	"args": ["c", "-r", "module.nim"],
     	"options": {
     		"cwd": "${workspaceRoot}"
     	},
     	"type": "shell",
     	"group": {
     		"kind": "build",
     		"isDefault": true
     	}
     }
  • nim.lintOnSave - perform the project check for errors on save
  • nim.project - optional array of projects file, if nim.project is not defined then all nim files will be used as separate project
  • nim.licenseString - optional license text that will be inserted on nim file creation

Example

{
	"nim.buildOnSave": false,
	"nim.buildCommand": "c",
	"nim.lintOnSave": true,
	"nim.project": ["project.nim", "project2.nim"],
	"nim.licenseString": "# Copyright 2017.\n\n"
}

Commands

The following commands are provided by the extension:

  • Nim: Run selected file - compile and run selected file, it uses c compiler by default, but you can specify cpp in nim.buildCommand config parameter. This command available from file context menu or by F6 keyboard shortcut.

TODO

  • Rename support
  • Code action for imports (suggest available modules to import)
  • Debug support

ChangeLog

ChangeLog is located here

vscode-nim's People

Contributors

kosz78 avatar rsduck avatar bung87 avatar yardanico avatar gulpf avatar oderwat avatar amadeusw avatar stromberg90 avatar yglukhov avatar dpuyosa avatar

Stargazers

Thomas Landin avatar

Watchers

James Cloos avatar  avatar  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.