coc-nasm
v0.4.0
Published
This is the snippets and autocompletions for Netwide Assembler language in coc.nvim
Downloads
321
Maintainers
Readme
Due to the high difficulty of Vietnamese Grade 10 Entrance Exam, I cannot update this plugin regularly (don't worry, it ends after the 31st of 2026 on which I take the exam). I need to spend my time focusing on the skills to do that exam (I am just 15 years old).
coc-nasm is a vim plug which can be downloaded from coc.nvim. It is also one of the plugin for Netwide Assembler (NASM) programing. In fact, Assembly Languages and Assemblers have few plugins for coding, but that does not mean we do not have any of them to support them.
📦 Install coc-nasm:
:CocInstall coc-nasm🌐 Our website (work in progress):
https://who5673.github.io/coc-nasm-web/‼️ NOTE: That website is under construction.
ℹ️About coc-nasm
- 🚀 Manufacturing date: The 6th of July, 2025 (7/6/2025 - mm/dd/yy);
- 👉🏻Reddit publish date: The 7th of July, 2025 (7/7/2025 - mm/dd/yy);
- 👉🏼This package is under MIT License, open-source;
- ❕It is one of the strong plugin for NASM;
- Netwide Assembler does have a lack of good plugins for snippets and auto-completions so that is why coc-nasm needs to be invented;
coc-nasmhas snippets and auto-completions for NASM, but note: This plugin does not support syntax highlighting. You may need them by installing third-party plugins for NASM. Fortunately, vim supports syntax highlighting for that language;- Should you have any problems while using this plugin, please report to me using GitHub Issues in order that I can be noticed as soon as I can. My contact information at
contact.txtin the GitHub repository;
🧰 Dependencies
Not all the dependencies of the app will be installed via :CocInstall coc-nasm, but you can install them from coc.nvim.
Firstly, to make sure that coc-nasm works correctly, after installing, you need to:
- Open a
.nasmfile; - Make sure you have coc.nvim installed (coc.nvim is released by neoclide);
(github link:
coc.nvim)
Secondly, install coc-snippets, as coc-nasm depends much on it:
:CocInstall coc-snippetsgithub link for coc-snippets (coc-snippets is invented by neoclide): coc-snippets
- Execute this command in vim command mode:
:CocRestart- Reload vim or restart your computer if necessary;
- 👉 Now, as I have not used Neovim's Lua to install this plgin, I cannot support you to install this plugin via ~/.config/nvim/init.lua. I am afraid that you need to think of the installation by yourself (even this can work on Neovim via Lua);
➡️Features
Currently, coc-nasm has some special words for NASM to use like:
| Name | Type (current)| Functions |
| ----- | ------------- | --------- |
|printHello | snippet | Print an example Netwide Assembler program (for Linux, it prints "Hello world"); |
|program | snippet | Get a basic template of a Netwide Assembler program to start coding faster (if you want to make a library, do not use this snippet) |
|sum | snippet | Get a basic example of a function that calculates the sum of 2 integers. |
|default rel | auto-completion | Must put this at the 1st (first) line of the NASM language if you want to create and import a NASM library into C/C++ or in another NASM script |
|const | snippet | equ $-labelname snippet to calculate the length of a string. Place this right after you have defined byte a string label. |
These are some snippets or completions that have been removed:
| Name | Removing date (month/date/year) | Type | Functions |
| ---- | ------------------------------- | ---- | --------- |
|pi64 and pi32 | 10/6/2025 | snippet | Basic pi for 64-bit (pi64) and 32-bit (pi32) architecture |
|basicoutput | 10/6/2025 | snippet | Write a basic script to print a variable into stdout (terminal screen). |
↘️More features:
- Supports basic NASM commands like
mov,lea,rep,...and some registers likerax,rdi,rsi,... - Supports preprocessors and standard macros;
- You do not need to configure anything in ~/.vimrc (Unix-based Operating System) or ~/_vimrc (Windows)
⚠️Please Note:
- This plugin is created so as to make you write the script faster, not for creating an environment to code NASM language more modern.
Therefore, I am not going to make a Language Server Protocol (LSP), formatters, IntelliSense, live preview or hot Reload, like modern plugins on VS Code and coc.nvim do. - You can use this plugin on Windows, but I recommend you to use this on Linux as I write this plugin on Kali Linux so that I may not know the issue it will happen in Windows Latest Version.
- As NASM does not have many long and new commands, we cannot support all the things like plugins for high-level language. Please note that NASM is a low-level language so you need to have skills from higher language than it. We strongly recommend that you need to learn how to program C and C++ first.
- Another important thing is that I do not want to add the feature that checks and alerts the wrong syntax in your script due to some mistakes must be made for another program running (such as emcc latest version), so if you use it, you need to learn how to debug and maintain your NASM script. Yep, NO WARRANTY.
- By the way, I hope that you will help me to make this plugin better for developers in the future. Due to the high difficulty of NASM, that will not be easy to do. However, I will also carry on developing newer version of coc-nasm even no one uses my plugin.
- I also suggest that you should write some plugins for yourself, especially Assemblers' plugins in general (such as GNU Assembler - GAS).
- As I have searched for NASM plugins, I realize that almost all of VS Code extensions, coc.nvim and many more IDE and plugs do not support NASM language.
- After reading those articles, I have a question like this:
Would you like to write more plugins for programming Assembler languages in the world? - Please answer my question in your mind and come up with your idea if you can. You do not need to send that idea to me.
💡See also
who5673-nasm - A plugin which has the benefit is almost like this plugin but for lazy.nvim
🤔 My plan in the future
- Creating a compiler to compile Netwide Assembler to WebAssembly (it is hard, so I can not do it by myself, but no one helps me so I need to it on my own).
Thank you for using my coc-nasm plugin so much.
This is an official coc.nvim plugin for NASM (made by who5673).
🗎 License
MIT
