un-object orient some functions

This commit is contained in:
2024-02-05 22:30:55 -05:00
parent d94b454eb6
commit 119127accf
5 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@ if not status_ok then
return return
end end
local has_words_before = function() local function has_words_before()
unpack = unpack or table.unpack unpack = unpack or table.unpack
local line, col = unpack(a.nvim_win_get_cursor(0)) local line, col = unpack(a.nvim_win_get_cursor(0))
return col ~= 0 and a.nvim_buf_get_lines(0, line - 1, line, true) return col ~= 0 and a.nvim_buf_get_lines(0, line - 1, line, true)

View File

@ -10,7 +10,7 @@ local function lsp_attach(client, bufnr)
vim.fn.sign_define(name, { text = text, texthl = name }) vim.fn.sign_define(name, { text = text, texthl = name })
end end
local map = function(m, lhs, rhs) local function map(m, lhs, rhs)
local opts = { remap = false, silent = true, buffer = bufnr } local opts = { remap = false, silent = true, buffer = bufnr }
vim.keymap.set(m, lhs, rhs, opts) vim.keymap.set(m, lhs, rhs, opts)
end end

View File

@ -35,7 +35,7 @@ telescope.setup {
preview = { preview = {
-- add image previews via chafa -- add image previews via chafa
mime_hook = function(filepath, bufnr, opts) mime_hook = function(filepath, bufnr, opts)
local is_image = function(filepath) local function is_image(filepath)
local image_extensions = { -- supported image formats local image_extensions = { -- supported image formats
'png', 'png',
'jpg', 'jpg',

View File

@ -1,5 +1,5 @@
vim.cmd('runtime mellow') vim.cmd('runtime mellow')
local highlight = function(group, opts, space) local function highlight(group, opts, space)
space = space or 0 space = space or 0
if type(group) == 'table' then if type(group) == 'table' then

View File

@ -37,7 +37,7 @@ map('n', '<leader>x', '<cmd>!chmod +x "%"<CR>') -- execute order 111
a.nvim_create_autocmd('FileType', { a.nvim_create_autocmd('FileType', {
pattern = 'netrw', pattern = 'netrw',
callback = function() callback = function()
local bind = function(lhs, rhs) local function bind(lhs, rhs)
vim.keymap.set('n', lhs, rhs, { remap = true, buffer = true }) vim.keymap.set('n', lhs, rhs, { remap = true, buffer = true })
end end
bind('h', '-^') -- Go up a directory bind('h', '-^') -- Go up a directory