47 lines
1.1 KiB
Django/Jinja
47 lines
1.1 KiB
Django/Jinja
--{{ 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" %}{% end %}
|
|
{% if command == "options" %}{% set t = "o" %}{% end %}
|
|
{% for k, v in settings.items() %}
|
|
vim.{{ t }}["{{ v.name }}"]{% if v.value is defined %}={% if v.value.integer() or v.value.boolean() %}{{ v.value }}{% else %}"{{ v.value }}"{% 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
|
|
|
|
-- optionally enable 24-bit colour
|
|
vim.opt.termguicolors = true
|
|
|
|
require("nvim-tree").setup({
|
|
sort = {
|
|
sorter = "case_sensitive",
|
|
},
|
|
view = {
|
|
width = 30,
|
|
},
|
|
renderer = {
|
|
group_empty = true,
|
|
},
|
|
filters = {
|
|
dotfiles = true,
|
|
},
|
|
})
|
|
{% endif %}
|