Neovim plugin for the ECMA-SL (ECMAScript-like) language, providing syntax highlighting via Tree-sitter.
Note: This plugin requires Neovim and nvim-treesitter. It no longer includes the legacy regex-based syntax highlighter.
- Tree-sitter Support: Highly accurate syntax highlighting, indentation, and folding.
- Filetype Detection: Automatically handles
.eslfiles. - Nix Support: Includes a Nix flake and
default.nixfor easy installation with NixOS and home-manager.
Add this to your home.nix:
{
programs.neovim = {
enable = true;
plugins = with pkgs.vimPlugins; [
{
plugin = ecmasl-vim;
config = ''
lua require("ecmasl").setup()
'';
}
];
};
# Make the plugin available
nixpkgs.overlays = [
(final: prev: {
ecmasl-vim = prev.vimUtils.buildVimPlugin {
pname = "ecmasl-vim";
version = "unstable";
src = builtins.fetchGit {
url = "https://github.com/yourusername/ecmasl-vim";
# Or point to your local clone
# url = "/path/to/your/ecmasl-vim/clone";
};
};
})
];
}Then, in your Neovim config, ensure nvim-treesitter is set up:
require('nvim-treesitter.configs').setup {
-- ensure_installed = { "c", "lua", "ecmasl" }, -- You can add ecmasl here
highlight = {
enable = true,
},
}{
"yourusername/ecmasl-vim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function()
require("ecmasl").setup()
-- You may need to run :TSInstall ecmasl if not using Nix
end
}MIT