update keybindings, add minimap plugin, disable mouse, add whitespace characters

main
Andrew Coleman 2022-05-31 11:55:59 -04:00
parent 5392bd33df
commit d154973cc8
1 changed files with 37 additions and 19 deletions

View File

@ -1,21 +1,13 @@
vim.opt.list = true
vim.opt.listchars = "tab:>-,trail:-"
vim.opt.mouse = ""
-- general
lvim.log.level = "warn"
lvim.format_on_save = true
-- vim.o.background = "light"
lvim.colorscheme = "base16-one-light"
-- keymappings [view all the defaults by pressing <leader>Lk]
lvim.leader = "space"
-- add your own keymapping
-- lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- unmap a default keymapping
-- lvim.keys.normal_mode["<C-Up>"] = false
-- edit a default keymapping
-- lvim.keys.normal_mode["<C-q>"] = ":q<cr>"
lvim.keys.normal_mode["<Tab>"] = ":bprevious<cr>"
lvim.keys.normal_mode["<S-Tab>"] = ":bnext<cr>"
lvim.keys.normal_mode["<F5>"] = ":pastetoggle<cr>"
vim.cmd [[
" Relative numbering
function! NumberToggle()
@ -26,11 +18,17 @@ function! NumberToggle()
set rnu
endif
endfunc
" Toggle between normal and relative numbering.
noremap <F6> :call NumberToggle()<cr>
]]
-- keymappings [view all the defaults by pressing <leader>Lk]
lvim.leader = "space"
lvim.keys.normal_mode["<F2>"] = ":bprevious<cr>"
lvim.keys.normal_mode["<F3>"] = ":bnext<cr>"
lvim.keys.normal_mode["<F5>"] = ":pastetoggle<cr>"
lvim.keys.normal_mode["<F6>"] = ":call NumberToggle()<cr>"
lvim.keys.normal_mode["<F7>"] = ":lua vim.lsp.stop_client(vim.lsp.get_active_clients())<cr>"
lvim.keys.normal_mode["<leader>g"] = ":Telescope live_grep<cr>"
-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
-- local _, actions = pcall(require, "telescope.actions")
@ -142,9 +140,20 @@ lvim.builtin.treesitter.highlight.enabled = true
-- Additional Plugins
lvim.plugins = {
{"RRethy/nvim-base16"},
{"rebelot/kanagawa.nvim"},
{"LunarVim/Colorschemes"},
{ "RRethy/nvim-base16" },
{ "rebelot/kanagawa.nvim" },
{ "LunarVim/Colorschemes" },
{ "nathom/filetype.nvim" },
{
'wfxr/minimap.vim',
run = "cargo install --locked code-minimap",
-- cmd = {"Minimap", "MinimapClose", "MinimapToggle", "MinimapRefresh", "MinimapUpdateHighlight"},
config = function()
vim.cmd("let g:minimap_width = 10")
vim.cmd("let g:minimap_auto_start = 1")
vim.cmd("let g:minimap_auto_start_win_enter = 1")
end,
},
}
-- {"folke/tokyonight.nvim"},
-- {
@ -159,5 +168,14 @@ lvim.plugins = {
-- }
lvim.autocommands.custom_groups = {
{ "FileType", "make", "set noexpandtab shiftwidth=8 softtabstop=0" },
{ "BufNewFile,BufRead", "justfile", "setf automake expandtab shiftwidth=8 softtabstop=0" },
{ "FileType", "justfile", "set expandtab tabstop=4 shiftwidth=4 softtabstop=4" }
}
local filetype = require("filetype")
filetype.setup({
overrides = {
literal = {
["justfile.nix"] = "just",
},
},
})