Syntax highlighting, cheatsheet, offline manual and fuzzy help plugin for the openscad language
OpenSCAD help system and syntax highlighting in Neovim.
This plugin was first created as a companion to the original openscad syntax highlighting.
But it now contains a modified and updated version. In addition a openscad-help filetype and syntax is implemented.
In the future maybe lsp, error checking, hints and completion will exist here.
Note that some features of this plugin is *NIX only
Nvim >= 0.5 (nightly)
Run :checkhealth to see if you fulfill the dependencies and requirements.
-
To install using packer.nvim
- Add this to your plugins.lua:
use { 'salkin-mada/openscad.nvim', requires = 'L3MON4D3/LuaSnip' config = function () require('openscad') -- Import snippets require"luasnip".snippets.openscad = require"openscad".get_snippets() end }
- run
:PackerInstallor:PackerSyncand compile lazy-loaders
-
To install using vim-plug
- Add this to your init.vim / .vimrc:
Plug 'salkin-mada/openscad.nvim' - do a
:PlugInstall - add
lua require('openscad')to yourinit.vim
lua require('openscad.nvim')
- Add this to your init.vim / .vimrc:
<Enter>/<C-m> in normal mode
Toggle cheatsheet window

<A-h> in normal mode
Fuzzy find help resource

<A-m> in normal mode
Open offline openscad manual in pdf via zathura

<A-o> in normal mode
Open file in OpenSCAD

<A-c> in normal mode
toggle htop filtered for openscad processes

These are the defaults:
vim.g.openscad_fuzzy_finder = 'skim'
vim.g.openscad_cheatsheet_window_blend = 15 --%
-- should the openscad project automatically be opened on startup
vim.g.openscad_auto_open = falseopenscad.nvim mappings is by default not enabled.
vim.g.openscad_default_mappings = trueThe default mappings are:
vim.g.openscad_cheatsheet_toggle_key = '<Enter>'
vim.g.openscad_help_trig_key = '<A-h>'
vim.g.openscad_help_manual_trig_key = '<A-m>'
vim.g.openscad_exec_openscad_trig_key = '<A-o>'
vim.g.openscad_top_toggle = '<A-c>'- Options and Mappings may be defined in either Lua or Vimscript.