From 0755c7e3d4cd2d44716705d79ef58fd1d3a9692d Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Sat, 19 Aug 2023 14:10:58 +0200 Subject: [PATCH] Update neovim setup --- tasks/neovim.yml | 8 ++++++++ templates/nvim/init.lua.j2 | 2 ++ templates/nvim/lua/auto-commands.lua.j2 | 2 +- templates/nvim/lua/git-signs.lua.j2 | 7 +++++++ templates/nvim/lua/lua-line.lua.j2 | 5 +++++ templates/nvim/lua/options.lua.j2 | 3 --- vars.yml | 2 ++ 7 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 templates/nvim/lua/git-signs.lua.j2 create mode 100644 templates/nvim/lua/lua-line.lua.j2 diff --git a/tasks/neovim.yml b/tasks/neovim.yml index 07fda39..4583f8d 100644 --- a/tasks/neovim.yml +++ b/tasks/neovim.yml @@ -124,3 +124,11 @@ src: 'templates/nvim/lua/tree-sitter.lua.j2', dest: '{{ xdg_config_dir }}/nvim/lua/tree-sitter.lua', } + - { + src: 'templates/nvim/lua/git-signs.lua.j2', + dest: '{{ xdg_config_dir }}/nvim/lua/git-signs.lua', + } + - { + src: 'templates/nvim/lua/lua-line.lua.j2', + dest: '{{ xdg_config_dir }}/nvim/lua/lua-line.lua', + } diff --git a/templates/nvim/init.lua.j2 b/templates/nvim/init.lua.j2 index b4553ac..8b29322 100644 --- a/templates/nvim/init.lua.j2 +++ b/templates/nvim/init.lua.j2 @@ -6,3 +6,5 @@ require('nvim-cmp') require('keybindings') require('auto-commands') require('tree-sitter') +require('lua-line') +require('git-signs') diff --git a/templates/nvim/lua/auto-commands.lua.j2 b/templates/nvim/lua/auto-commands.lua.j2 index d4310aa..bdaa7c8 100644 --- a/templates/nvim/lua/auto-commands.lua.j2 +++ b/templates/nvim/lua/auto-commands.lua.j2 @@ -1,7 +1,7 @@ -- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} --colorscheme -vim.cmd('colorscheme space_vim_theme') +vim.cmd('colorscheme edge') --enable this option here as the events are used in this buffer vim.cmd('syntax on') diff --git a/templates/nvim/lua/git-signs.lua.j2 b/templates/nvim/lua/git-signs.lua.j2 new file mode 100644 index 0000000..9af8e6d --- /dev/null +++ b/templates/nvim/lua/git-signs.lua.j2 @@ -0,0 +1,7 @@ +-- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} + +local gitsigns = require('gitsigns'); + +gitsigns.setup({ + numhl = true; +}) diff --git a/templates/nvim/lua/lua-line.lua.j2 b/templates/nvim/lua/lua-line.lua.j2 new file mode 100644 index 0000000..aa2fbfe --- /dev/null +++ b/templates/nvim/lua/lua-line.lua.j2 @@ -0,0 +1,5 @@ +-- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} + +local lualine = require('lualine'); + +lualine.setup({}) diff --git a/templates/nvim/lua/options.lua.j2 b/templates/nvim/lua/options.lua.j2 index 963a30e..7e74ef2 100644 --- a/templates/nvim/lua/options.lua.j2 +++ b/templates/nvim/lua/options.lua.j2 @@ -8,9 +8,6 @@ vim.o.syntax = 'on' -- display all matching files when we tab complete vim.o.wildmenu = true --- replace vertical split pipe character with space -vim.o.fillchars = 'vert:|,fold: ' - -- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable -- delays and poor user experience. vim.o.updatetime = 300 diff --git a/vars.yml b/vars.yml index 5a757ba..32ec4cf 100644 --- a/vars.yml +++ b/vars.yml @@ -58,6 +58,8 @@ neovim_plugins: } - { url: 'https://github.com/L3MON4D3/LuaSnip', name: 'luasnip', version: 'v1.0.0' } - { url: 'https://github.com/lewis6991/gitsigns.nvim', name: 'gitsigns.nvim' } + - { url: 'https://github.com/sainnhe/edge', name: 'edge' } + - { url: 'https://github.com/nvim-lualine/lualine.nvim', name: 'lualine' } language_servers: - ansible-language-server