Formatting

master
Dustin Swan 1 year ago
parent a2ffa8b3bc
commit 5f0a64f64c
Signed by: dustinswan
GPG Key ID: AB49BD6B2B3A6377

@ -15,13 +15,18 @@ vim.opt.termguicolors = true
vim.opt.completeopt = "menu,menuone,noselect"
vim.opt.cursorline = true
vim.api.nvim_create_autocmd("FileType", { pattern = { "org" }, command = "setlocal nowrap" })
vim.api.nvim_create_autocmd('FileType', { pattern = 'org', command = 'setlocal nowrap' })
vim.api.nvim_create_autocmd('TextYankPost', {
pattern = '*',
callback = function()
vim.highlight.on_yank { higroup = 'IncSearch' }
end,
})
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
@ -242,7 +247,10 @@ require('packer').startup(function(use)
use {
"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup({ direction = 'float' })
require("toggleterm").setup({
direction = 'float',
open_mapping = [[<c-t>]]
})
end
}
@ -284,6 +292,7 @@ wk.register({
r = { "<cmd>Telescope oldfiles<cr>", "Recent Files" },
b = { "<cmd>Telescope buffers<cr>", "Buffers" },
},
F = { ":lua vim.lsp.buf.format()<cr>", "Format Buffer" },
J = { ":SplitjoinJoin<cr>", "Join" },
t = {
name = "Table",
@ -302,5 +311,4 @@ wk.register({
},
["<S-l>"] = { ":BufferLineCycleNext<cr>", "Next Tab" },
["<S-h>"] = { ":BufferLineCyclePrev<cr>", "Previous Tab" },
["<C-t>"] = { ":ToggleTerm<cr>", "Terminal" },
})

Loading…
Cancel
Save