nvim: Rename helpers module to util module
This commit is contained in:
parent
3d4199d743
commit
8d40fd843e
3 changed files with 2 additions and 29 deletions
|
@ -1,27 +0,0 @@
|
||||||
-- augroup utility function
|
|
||||||
--
|
|
||||||
-- Let's you create and use autogroups through lua
|
|
||||||
-- which (as of now) is not possible through official nvim api
|
|
||||||
--
|
|
||||||
-- Cribbed from the very helpful https://icyphox.sh/blog/nvim-lua - Thank you!
|
|
||||||
--
|
|
||||||
-- Example usage settings.lua
|
|
||||||
-- local cmd = vim.cmd
|
|
||||||
-- local u = require('utils')
|
|
||||||
-- u.create_augroup({
|
|
||||||
-- { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' },
|
|
||||||
-- { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' },
|
|
||||||
-- }, 'ftmail')
|
|
||||||
-- cmd('au BufNewFile,BufRead * if &ft == "" | set ft=text | endif')
|
|
||||||
|
|
||||||
local cmd = vim.cmd
|
|
||||||
|
|
||||||
|
|
||||||
return function(cmds, groupname)
|
|
||||||
cmd('augroup ' .. groupname)
|
|
||||||
cmd('autocmd!')
|
|
||||||
for _, autocmd in ipairs(cmds) do
|
|
||||||
cmd('autocmd ' .. table.concat(autocmd, ' '))
|
|
||||||
end
|
|
||||||
cmd('augroup END')
|
|
||||||
end
|
|
|
@ -1,8 +1,8 @@
|
||||||
local b = require('base16')
|
local b = require('base16')
|
||||||
|
|
||||||
-- italic comments if supported
|
-- italic comments if supported
|
||||||
local set_hl = require("helpers.highlight")
|
local set_hl = require("util.highlight")
|
||||||
set_hl("Comment", {gui = "italic"})
|
set_hl("Comment", { gui = "italic" })
|
||||||
vim.api.nvim_set_var('gruvbox_italic', 1)
|
vim.api.nvim_set_var('gruvbox_italic', 1)
|
||||||
vim.api.nvim_set_var('one_allow_italics', 1)
|
vim.api.nvim_set_var('one_allow_italics', 1)
|
||||||
vim.api.nvim_set_var('pencil_terminal_italics', 1)
|
vim.api.nvim_set_var('pencil_terminal_italics', 1)
|
||||||
|
|
Loading…
Reference in a new issue