Module scnvim.config

Default configuration.

Provides fallback values not specified in the user config.

Functions

resolve (config) Merge the user configuration with the default values.

Tables

default table
default.sclang table
default.keymaps table (empty by default)
default.documentation table
default.postwin table
default.postwin.float table
default.postwin.float.config table
default.editor table
editor.highlight table
editor.highlight.flash table
editor.highlight.fade table
editor.signature table
snippet table
snippet.engine table
statusline table
extensions table


Functions

resolve (config)
Merge the user configuration with the default values.

Parameters:

  • config The user configuration

Tables

default
table

Fields:

  • ensure_installed (default: true) If installed once, this can be set to false to improve startup time.
default.sclang
table

Fields:

  • cmd Path to the sclang executable. Not needed if sclang is already in your $PATH.
  • args Comma separated arguments passed to the sclang executable.
default.keymaps
table (empty by default)

Fields:

  • keymap scnvim.map

Usage:

    keymaps = {
       ['<M-e>'] = map('editor.send_line', {'i', 'n'}),
       ['<C-e>'] = {
         map('editor.send_block', {'i', 'n'}),
         map('editor.send_selection', 'x'),
       },
       ['<leader>st'] = map('sclang.start'),
       ['<leader>sk'] = map('sclang.recompile'),
     }
default.documentation
table

Fields:

  • cmd Absolute path to the render program (e.g. /opt/homebrew/bin/pandoc)
  • args (default: { '$1', '--from', 'html', '--to', 'plain', '-o', '$2' })

    Arguments given to the render program. The default args are for pandoc. Any program that can convert html into plain text should work. The string $1 will be replaced with the input file path and $2 will be replaced with the output file path.

  • horizontal (default: true) Open the help window as a horizontal split
  • direction (default: 'top') Direction of the split: 'top', 'right', 'bot', 'left'
  • keymaps (default: true) If true apply user keymaps to the help window. Use a table value for explicit mappings.
default.postwin
table

Fields:

  • highlight (default: true) Use syntax colored post window output.
  • auto_toggle_error (default: true) Auto-toggle post window on errors.
  • scrollback (default: 5000) The number of lines to save in the post window history.
  • horizontal (default: false) Open the post window as a horizontal split
  • direction (default: 'right') Direction of the split: 'top', 'right', 'bot', 'left'
  • size Use a custom initial size
  • fixed_size Use a fixed size for the post window. The window will always use this size if closed.
  • keymaps (default: true) If true apply user keymaps to the help window. Use a table value for explicit mappings.
default.postwin.float
table

Fields:

  • enabled (default: false) Use a floating post window.
  • row (default: 0) The row position, can be a function.
  • col (default: vim.o.columns) The column position, can be a function.
  • width (default: 64) The width, can be a function.
  • height (default: 14) The height, can be a function.
  • callback (default: function(id) vim.api.nvim_win_set_option(id, 'winblend', 10) end) Callback that runs whenever the floating window was opened. Can be used to set window local options.
default.postwin.float.config
table

Fields:

  • border (default: 'single')
  • ... See :help nvim_open_win for possible values
default.editor
table

Fields:

  • force_ft_supercollider (default: true) Treat .sc files as supercollider. If false, use nvim's native ftdetect.
editor.highlight
table

Fields:

  • color (default: TermCursor) Highlight group for the flash color. Use a table for custom colors: color = { guifg = 'black', guibg = 'white', ctermfg = 'black', ctermbg = 'white' }
  • type (default: 'flash') Highligt flash type: 'flash', 'fade' or 'none'
editor.highlight.flash
table

Fields:

  • duration (default: 100) The duration of the flash in ms.
  • repeats (default: 2) The number of repeats.
editor.highlight.fade
table

Fields:

  • duration (default: 375) The duration of the flash in ms.
editor.signature
table

Fields:

  • float (default: true) Show function signatures in a floating window
  • auto (default: true) Show function signatures while typing in insert mode
  • config
snippet
table
snippet.engine
table

Fields:

  • name Name of the snippet engine
  • options Table of engine specific options (note, currently not in use)
statusline
table

Fields:

  • poll_interval (default: 1) The interval to update the status line widgets in seconds.
extensions
table
generated by LDoc 1.5.0 Last updated 2024-09-16 07:21:44