From 9bcaf4cc77e6d5cff2ba9af1a457b5a6ad9d911d Mon Sep 17 00:00:00 2001 From: Maciej Lebiest Date: Sun, 13 Oct 2024 20:14:30 +0200 Subject: [PATCH] update jinja stuff --- lua/general.lua | 33 ++++++++++++++++++++------------- lua/lazy-load.lua | 3 ++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lua/general.lua b/lua/general.lua index 8d93e5c..c7e9bd6 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -30,9 +30,10 @@ VIRTUAL_TEXT_ENABLED = true function switch_virtual_text() VIRTUAL_TEXT_ENABLED = not VIRTUAL_TEXT_ENABLED vim.diagnostic.config({ - virtual_text = VIRTUAL_TEXT_ENABLED, + virtual_text = VIRTUAL_TEXT_ENABLED, }) end + map("n", "vt", ":lua switch_virtual_text()") map("c", "", ":Telescope command_history") map("n", "gs", ":Telescope git_status") @@ -58,26 +59,32 @@ map("v", "", " does the right thing +vim.opt.tabstop = 4 -- number of columns occupied by a tab +vim.opt.softtabstop = 4 -- see multiple spaces as tabstops so does the right thing vim.opt.expandtab = true -- converts tabs to white space -vim.opt.shiftwidth = 4 -- width for autoindents +vim.opt.shiftwidth = 4 -- width for autoindents +vim.filetype.add({ + extension = { + sls = "sls.yaml.jinja", + jinja = 'jinja', + jinja2 = 'jinja', + j2 = 'jinja', + }, +}) vim.cmd [[ - highlight clear colorscheme gruvbox - autocmd BufNewFile,BufRead *.sls set filetype=sls.yaml.jinja2 ]] diff --git a/lua/lazy-load.lua b/lua/lazy-load.lua index 68dc3c2..330cd2a 100644 --- a/lua/lazy-load.lua +++ b/lua/lazy-load.lua @@ -152,7 +152,8 @@ require("lazy").setup({ opts = require('plugins.lualine').config }, { 'RRethy/vim-illuminate' }, - { 'sheerun/vim-polyglot' }, + --{ 'sheerun/vim-polyglot' }, -- not maintained + { 'HiPhish/jinja.vim' }, -- themes { "ellisonleao/gruvbox.nvim", priority = 1000, config = true },