# Compact.vim – Vim/Neovim Syntax Highlighting & Tree-sitter Support for Compact

**URL:** <https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836>\
**Category:** General\
**Tags:** compact, ecosytem\
**Created:** [December 16, 2025, 10:43am UTC](https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836 "2025-12-16T10:43:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![speres](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/speres/32/322_2.png) [@speres](https://forum.midnight.network/u/speres)\
**Post date:** [December 16, 2025, 10:43am UTC](https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836/1 "2025-12-16T10:43:45Z")

</div>

## compact.vim – Vim/Neovim Support for Compact

**compact.vim** provides syntax highlighting and editor support for the Compact smart contract language (Midnight network) in Vim and Neovim.

### Features

- **Syntax highlighting** for `.compact` files (regex-based for Vim, tree-sitter for Neovim)
- **Filetype detection** – automatic recognition of `.compact` files
- **Smart indentation** – context-aware indentation for blocks and functions
- **Comment support** – single-line (`//`) and block comments (`/* */`)

### Installation

Works with all popular plugin managers:

**lazy.nvim**

```lua
{ "1NickPappas/compact.vim", ft = "compact" }

```

**vim-plug**

```auto
  Plug '1NickPappas/compact.vim'

```

**Native (Vim 8+ / Neovim)**

```auto
  git clone https://github.com/1NickPappas/compact.vim \
      ~/.local/share/nvim/site/pack/plugins/start/compact.vim

```

Links

🔗 GitHub: [https://github.com/1NickPappas/compact.vim](https://github.com/1NickPappas/compact.vim)

* * *

🧪 Note: This is an experimental project developed in my personal free time for educational purposes. Any feedback, suggestions, or contributions are greatly appreciated!

* * *

---

<div class="post-metadata">

**Author:** ![emnul](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/emnul/32/81_2.png) [@emnul](https://forum.midnight.network/u/emnul)\
**Post date:** [December 22, 2025, 7:23pm UTC](https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836/2 "2025-12-22T19:23:52Z")

</div>

I’ve been waiting for a vim integration 🙌

---

<div class="post-metadata">

**Author:** ![speres](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.midnight.network/speres/32/322_2.png) [@speres](https://forum.midnight.network/u/speres)\
**Post date:** [December 24, 2025, 9:07am UTC](https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836/3 "2025-12-24T09:07:29Z")

</div>

Hey! Glad to hear that was helpful for someone else, too. I’ve actually set up a full Neovim integration and built the missing LSP myself so I could work with Compact in my favorite editor.

You can find it here: [Compact-lsp – Language Server Protocol Implementation for Compact](https://forum.midnight.network/t/compact-lsp-language-server-protocol-implementation-for-compact/842)

\*The implementation details are in the repo README and should help you get everything set up.

Let me know if it works for you. Have fun!

---

<div class="post-metadata">

**Author:** ![BlazeFinery](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@BlazeFinery](https://forum.midnight.network/u/BlazeFinery)\
**Post date:** [January 31, 2026, 1:41pm UTC](https://forum.midnight.network/t/compact-vim-vim-neovim-syntax-highlighting-tree-sitter-support-for-compact/836/4 "2026-01-31T13:41:24Z")

</div>

Definitely checking this out
