theonepath.nvim/init.lua
2024-01-27 12:44:08 +00:00

46 lines
1.8 KiB
Lua

require('plugin')
-- Instantiate the gruvbox theme via native vimscript
-- Note: this always comes before anything, or the theme breaks
vim.cmd([[
set termguicolors
let g:gruvbox_italic=1
set cursorline
set cursorcolumn
set number
set spell
set textwidth=120 sw=4 ts=4 et colorcolumn=120
highlight ColorColumn ctermbg=0
set splitbelow splitright
autocmd BufRead,BufNewFile *.bottle set filetype=bottle
AirlineTheme catppuccin
]])
-- Custom extension presser (WIP)
local presser = require'presser-ui'
presser.setup( { } )
-- Custom keybindings using the util `map` function
local map = require("utils").map
local opts = { silent=true }
vim.g.mapleader = 'e' -- leader for Edit Mode functions
--- Mappings for Edit Mode ---
map("v", "<Leader>h", ":s//") -- visual selection replace with last buffer item
map("n", "<Leader>g", "<Cmd>Telescope live_grep<CR>", opts) -- Telescope live grep search
map("n", "<Leader>o", "<Cmd>Telescope file_browser<CR>", opts) -- Open Telescope to grab new file
vim.g.mapleader = 'f' -- leader for File Mode functions
--- Mappings for File Mode ---
--map("n", "<Leader>o", "<Cmd>Telescope file_browser<CR>", opts) -- Telescope file browser
map("ni", "<C-w>T", "<Esc><Cmd>tabnew<CR> | <Cmd>Telescope file_browser<CR>", opts) -- Open a new tab buffer
map("ni", "<C-w>v", "<Esc><C-w>v<CR> | <Cmd>Telescope file_browser<CR>A", opts) -- Open a new verticle split
map("ni", "<C-w>s", "<Esc><C-w>s<CR> | <Cmd>Telescope file_browser<CR>A", opts) -- Open a new horizontal split
vim.g.mapleader = 't' -- leader for Terminal Mode functions
--- Mappings for Terminal Mode ---
map("n", "<Leader>vr", ":vert res 80") -- change verticle size of focused window to x (Default: x = 80)
map("n", "<Leader>hr", ":horizontal res ") -- change horizontal size of focused window to x (No default)