Skip to content

auwsmit/odin4vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odin4vim

A Vim and Neovim plugin to give native-feeling support for the Odin programming language. Features include: syntax highlighting, proper indenting, :compiler odin to have quickfix error handling, and [[/]] to jump between functions.

The highlighting has been made to very closely match Sublime's Odin highlighting (at least as much as possible given the editor differences). The syntax file and highlight groups should be very easy to read/modify/override for your preferences (there are some disabled optionals such as highlights for constant declarations, for example).

Written entirely in vimscript, so will work with Vim, as well as Neovim.

Credits

Yes, now there are at least 4 separate odin plugins for vim. You could make the fifth!

Installation

  • Manual: clone the repo into your vim config plugins folder
  • vim-plug: Plug 'auwsmit/odin4vim'
  • Neovim 0.12+ builtin: vim.pack.add({ 'https://github.com/auwsmit/odin4vim' })
  • lazy.nvim: { 'auwsmit/odin4vim' }

Run :compiler odin in vim to set 'makeprg' to odin build . for that session. Then, running :make will build the current directory and fill the quickfix list with any warnings or errors, which can be quickly navigated with [q/]q.

Preview Screenshots

Font: Fantasque Sans Mono, sans ligatures

catppuccin (comes with Vim v9.2.0219+ and Neovim 0.12+) Screenshot

habamax (comes with vim/nvim) Screenshot

badwolf Screenshot

unokai (comes with vim/nvim) Screenshot

Why? What's wrong with the others?

  • habamax/vim-odin has intentionally very minimal highlighting, but I wanted it to be more like Sublime's.
  • Tetralux/odin.vim had simplistic/poor indenting support, no extra features, and the syntax file was pretty dated and disorganized (mostly due to being initially based on jai back in 2017).
  • mindhopper/nvim-odin is impressive in its scope and features, but is only for neovim, and in my testing has some false-positives for highlights. It's just a bit "over-opinionated" for me, but again, is also really cool and impressive. You should check it out as an alternative to odin4vim!

About

Vim/Neovim support for the Odin programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vim Script 100.0%