update keybindings, add minimap plugin, disable mouse, add whitespace characters
parent
5392bd33df
commit
d154973cc8
|
@ -1,21 +1,13 @@
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars = "tab:>-,trail:-"
|
||||||
|
vim.opt.mouse = ""
|
||||||
|
|
||||||
-- general
|
-- general
|
||||||
lvim.log.level = "warn"
|
lvim.log.level = "warn"
|
||||||
lvim.format_on_save = true
|
lvim.format_on_save = true
|
||||||
-- vim.o.background = "light"
|
-- vim.o.background = "light"
|
||||||
lvim.colorscheme = "base16-one-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 [[
|
vim.cmd [[
|
||||||
" Relative numbering
|
" Relative numbering
|
||||||
function! NumberToggle()
|
function! NumberToggle()
|
||||||
|
@ -26,11 +18,17 @@ function! NumberToggle()
|
||||||
set rnu
|
set rnu
|
||||||
endif
|
endif
|
||||||
endfunc
|
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.
|
-- 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.
|
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
|
||||||
-- local _, actions = pcall(require, "telescope.actions")
|
-- local _, actions = pcall(require, "telescope.actions")
|
||||||
|
@ -145,6 +143,17 @@ lvim.plugins = {
|
||||||
{ "RRethy/nvim-base16" },
|
{ "RRethy/nvim-base16" },
|
||||||
{ "rebelot/kanagawa.nvim" },
|
{ "rebelot/kanagawa.nvim" },
|
||||||
{ "LunarVim/Colorschemes" },
|
{ "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"},
|
-- {"folke/tokyonight.nvim"},
|
||||||
-- {
|
-- {
|
||||||
|
@ -159,5 +168,14 @@ lvim.plugins = {
|
||||||
-- }
|
-- }
|
||||||
lvim.autocommands.custom_groups = {
|
lvim.autocommands.custom_groups = {
|
||||||
{ "FileType", "make", "set noexpandtab shiftwidth=8 softtabstop=0" },
|
{ "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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue