Skip to content

salkin-mada/openscad.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openscad.nvim

Syntax highlighting, cheatsheet, snippets, 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

Requirements

Nvim >= 0.5

Dependencies

Run :checkhealth to see if you fulfill the dependencies and requirements.

Install

  • Using packer.nvim
    use {
        'salkin-mada/openscad.nvim',
        config = function ()
            require('openscad')
            -- load snippets, note requires
            vim.g.openscad_load_snippets = true
        end,
        requires = 'L3MON4D3/LuaSnip'
    }

Available mappings

<Enter>/<C-m> in normal mode Toggle cheatsheet window cheatsheet

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

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

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

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

Options

These are the defaults:

vim.g.openscad_fuzzy_finder = 'skim'
vim.g.openscad_cheatsheet_window_blend = 15 --%
vim.g.openscad_load_snippets = false
-- should the openscad project automatically be opened on startup
vim.g.openscad_auto_open = false

Mappings

openscad.nvim mappings is by default not enabled.

vim.g.openscad_default_mappings = true

The 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.

About

openscad plugin for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published