vim.g.floaterm_autoclose = 1 local function nnoremap(shortcut, command, desc) vim.keymap.set("n", shortcut, command, { noremap = true, silent = true, desc = desc }) end local function tnoremap(shortcut, command) vim.keymap.set("t", shortcut, command, { noremap = true, silent = true }) end nnoremap("w", ":write!") nnoremap("Q", "@q") nnoremap("vp", ":Telescope find_files search_dirs=$HOME/.config/nvim/") nnoremap("vn", function() local new_file = vim.fn.input(":new $HOME/.config/nvim/") vim.cmd("new $HOME/.config/nvim/" .. new_file) end) nnoremap("", ":nohlsearch:echo", "Clear highlights and the cmdline") -- terminal nnoremap("T", ":split:terminali") -- Movement tnoremap("", "h") tnoremap("", "j") tnoremap("", "k") tnoremap("", "l") -- Make movement and mode changes remove highlights nnoremap("", "h") nnoremap("", "j") nnoremap("", "k") nnoremap("", "l") -- Move tabs nnoremap("", "gT") nnoremap("", "gt") vim.cmd([[hi link helpCommand Type]]) vim.opt_global.runtimepath:append("~/workspace/nvim/crates") -- Various lsp things require 'lsp_test' -- Toggle inlay hints vim.keymap.set("n", "i", function() vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) end) function R(name) package.loaded[name] = nil return require(name) end