style(nvim): run stylua

This commit is contained in:
Oliver Davies 2022-03-22 21:27:38 +00:00
parent bc4e9b7952
commit 903a36451d
6 changed files with 46 additions and 32 deletions

View file

@ -7,9 +7,24 @@ neogit.setup {
disable_commit_confirmation = true,
}
local nmap = require('opdavies.keymap').nmap
local nmap = require("opdavies.keymap").nmap
nmap { "<leader>gc", function() neogit.open { "commit" } end }
nmap { "<leader>gl", function() neogit.open { "log" } end }
nmap { "<leader>gp", function() neogit.open { "push" } end }
nmap {
"<leader>gc",
function()
neogit.open { "commit" }
end,
}
nmap {
"<leader>gl",
function()
neogit.open { "log" }
end,
}
nmap {
"<leader>gp",
function()
neogit.open { "push" }
end,
}
nmap { "<leader>gs", neogit.open }

View file

@ -3,9 +3,9 @@ if not has_lir then
return
end
local actions = require'lir.actions'
local clipboard_actions = require'lir.clipboard.actions'
local mark_actions = require 'lir.mark.actions'
local actions = require "lir.actions"
local clipboard_actions = require "lir.clipboard.actions"
local mark_actions = require "lir.mark.actions"
lir.setup {
hide_cursor = true,
@ -13,37 +13,37 @@ lir.setup {
-- devicons_enable = true,
mappings = {
['l'] = actions.edit,
['<C-s>'] = actions.split,
['<C-v>'] = actions.vsplit,
['<C-t>'] = actions.tabedit,
["l"] = actions.edit,
["<C-s>"] = actions.split,
["<C-v>"] = actions.vsplit,
["<C-t>"] = actions.tabedit,
['h'] = actions.up,
['q'] = actions.quit,
["h"] = actions.up,
["q"] = actions.quit,
['K'] = actions.mkdir,
['N'] = actions.newfile,
['R'] = actions.rename,
['@'] = actions.cd,
['Y'] = actions.yank_path,
['.'] = actions.toggle_show_hidden,
['D'] = actions.delete,
["K"] = actions.mkdir,
["N"] = actions.newfile,
["R"] = actions.rename,
["@"] = actions.cd,
["Y"] = actions.yank_path,
["."] = actions.toggle_show_hidden,
["D"] = actions.delete,
['J'] = function()
["J"] = function()
mark_actions.toggle_mark()
vim.cmd('normal! j')
vim.cmd "normal! j"
end,
['C'] = clipboard_actions.copy,
['X'] = clipboard_actions.cut,
['P'] = clipboard_actions.paste,
["C"] = clipboard_actions.copy,
["X"] = clipboard_actions.cut,
["P"] = clipboard_actions.paste,
},
float = {
winblend = 0,
curdir_window = {
enable = false,
highlight_dirname = false
highlight_dirname = false,
},
},
@ -58,7 +58,6 @@ lir.setup {
)
-- echo cwd
vim.api.nvim_echo({ { vim.fn.expand("%:p"), "Normal" } }, false, {})
vim.api.nvim_echo({ { vim.fn.expand "%:p", "Normal" } }, false, {})
end,
}

View file

@ -8,7 +8,7 @@ local nvim_status = require "lsp-status"
local imap = require("opdavies.keymap").imap
local nmap = require("opdavies.keymap").nmap
local telescope_mapper = require("opdavies.telescope.mappings")
local telescope_mapper = require "opdavies.telescope.mappings"
local buf_nnoremap = function(opts)
opts.buffer = 0

View file

@ -19,5 +19,5 @@ null_ls.setup {
diagnostics.phpstan,
completion.spell,
}
},
}

View file

@ -102,7 +102,7 @@ local function set_vim_o()
end
vim.opt.clipboard:append "unnamedplus"
vim.opt.completeopt = {"menu", "menuone", "noselect"}
vim.opt.completeopt = { "menu", "menuone", "noselect" }
end
M.setup = function()

View file

@ -51,7 +51,7 @@ end
function M.live_grep()
require("telescope.builtin").live_grep {
sorting_strategy = "ascending"
sorting_strategy = "ascending",
}
end