--{{ salt['pillar.get']('salt_managed', default='Salt Managed') }} {%- from "neovim/map.jinja" import neovim with context %} -- NeoVIM global configs vim.cmd.colorscheme('{{ neovim.config.use_theme }}') vim.cmd.filetype('plugin on') {%- if neovim.config.use_syntax %} vim.cmd.syntax('on') {%- endif %} {% macro cfg(command, settings) -%} {% if command == "globals" %}{% set t = "g" %}{% endif %} {% if command == "options" %}{% set t = "o" %}{% endif %} {% for k, v in settings.items() %} vim.{{ t }}["{{ k }}"]{% if v is defined %}={% if v is integer or v is boolean %}{{ v }}{% else %}"{{ v }}"{% endif %}{% endif %} {%- endfor %} {% endmacro -%} -- NeoVIM globals {{- cfg("globals", neovim.config.globals) }} -- NeoVIM options {{- cfg("options", neovim.config.options) }} {% if "nvim-tree" in neovim.plugins.keys() %} vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.opt.termguicolors = true require("nvim-tree").setup({ sort = { sorter = "case_sensitive", }, view = { width = 30, }, renderer = { group_empty = true, }, filters = { dotfiles = true, }, }) {% endif %}