Skip to content

Official Jule extension for Neovim

License

Notifications You must be signed in to change notification settings

julelang/jule.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

11c983f · Feb 22, 2025

History

41 Commits
Feb 15, 2025
Dec 16, 2024
Dec 16, 2024
Jan 11, 2025
Jan 11, 2025
Feb 15, 2025
Feb 22, 2025
Dec 15, 2024
Jan 2, 2025
Feb 15, 2025
Dec 22, 2024

Repository files navigation

Jule for Neovim

Official Jule extension for Neovim.



Features

  • Syntax highlighting
  • Code formatting (julefmt)
  • Basic keyword completion source for nvim-cmp

Installation

Add the following line to your Vim configuration file:

Plug 'julelang/jule.nvim'

Then run the following command:

:PlugInstall

Configuration

Code formatting

require('jule').setup {
  format_on_save = true,
  format_command = "julefmt -w %" -- default, optional
}

Completion source

Note that nvim-cmp has to be installed.

require('jule').setup {
  enable_cmp = true
}

require('cmp').setup {
  sources = {
    { name = 'jule' }
  }
}

Development

Requirements

Setup

  1. Make sure all the requirements are installed and are available in your PATH variable
  2. Clone the repository and navigate to its directory:
$ git clone git@github.com:julelang/jule.nvim.git
$ cd jule.nvim

Execution

  1. Create a test Jule module:
$ julec mod init
$ printf "fn main() {\n    println(\"Hello world\")\n}" > main.jule
  1. Get the path to the plugin:
$ pwd
  1. Open Neovim:
$ nvim main.jule
  1. Set the runtime path and filetype:
:set runtimepath+=/path/to/jule.nvim
:set filetype=jule
  1. Source the plugin:
:source /path/to/jule.nvim/lua/jule/init.lua
  1. Configure the plugin:
:lua require('jule').setup { format_on_save = true }
  1. Done! (you might need to re-open the buffer for the completion source to initialize properly)

Code of Conduct

See the Julenour Code of Conduct

License

The extension is distributed under the terms of the BSD 3-Clause license.
See License Details