Leslie Kerman
6 months ago
8 changed files with 270 additions and 200 deletions
@ -0,0 +1,46 @@ |
|||
{ |
|||
"LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" }, |
|||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, |
|||
"aylin.vim": { "branch": "master", "commit": "d9532f02f5ea8f396fc62c50bb34c348b4a9aa02" }, |
|||
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, |
|||
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, |
|||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, |
|||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, |
|||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, |
|||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, |
|||
"edge": { "branch": "master", "commit": "4e2eee9fbbad1c8fdcad8acda979d3828aee538d" }, |
|||
"everforest-nvim": { "branch": "main", "commit": "5e0e32a569fb464911342f0d421721cc1c94cf25" }, |
|||
"github-nvim-theme": { "branch": "main", "commit": "7b97aa55ef9dabce479f74f86b8c61c1464c9d2e" }, |
|||
"gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" }, |
|||
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, |
|||
"haskell-tools.nvim": { "branch": "master", "commit": "217cb7958ebbebf360f7c43efd5129e66d748042" }, |
|||
"kanagawa.nvim": { "branch": "master", "commit": "860e4f80df71221d18bf2cd9ef1deb4d364274d2" }, |
|||
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" }, |
|||
"lspsaga.nvim": { "branch": "main", "commit": "052234296f13e2705d5d290c7bd5a36d3dd81fde" }, |
|||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, |
|||
"material.vim": { "branch": "main", "commit": "07e70d5d675fadb1e81191b2d990b2a72edccf0d" }, |
|||
"nlsp-settings.nvim": { "branch": "main", "commit": "2421dc3811af0c870ca93dcaf714943339e7ea88" }, |
|||
"nordic.nvim": { "branch": "main", "commit": "03fcff3c8d68049b8118047784746048b4a08049" }, |
|||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, |
|||
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, |
|||
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, |
|||
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, |
|||
"nvim-tree.lua": { "branch": "master", "commit": "347e1eb35264677f66a79466bb5e3d111968e12c" }, |
|||
"nvim-treesitter": { "branch": "master", "commit": "99d3e799b46f5c2a1fc0d7a42d7ab452de48c067" }, |
|||
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" }, |
|||
"one-nvim": { "branch": "main", "commit": "faf6fb3f98fccbe009c3466f657a8fff84a5f956" }, |
|||
"onedark.vim": { "branch": "main", "commit": "57b77747694ea5676c3ca0eeaf9567dc499730c0" }, |
|||
"oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" }, |
|||
"papercolor-theme": { "branch": "master", "commit": "0cfe64ffb24c21a6101b5f994ca342a74c977aef" }, |
|||
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, |
|||
"ripgrep": { "branch": "master", "commit": "bb8601b2bafb5e68181cbbb84e6ffa4f7a72bf16" }, |
|||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, |
|||
"sonokai": { "branch": "master", "commit": "da162343354fbd9bf9cd49293a856f0e3761e8ac" }, |
|||
"space-vim-dark": { "branch": "master", "commit": "0ab698bd2a3959e3bed7691ac55ba4d8abefd143" }, |
|||
"telescope.nvim": { "branch": "master", "commit": "2d0d057791854decb2c9b6a0b52d43f3900dff40" }, |
|||
"toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, |
|||
"tokyodark.nvim": { "branch": "master", "commit": "ba538ab69e8a4e3ebac127734b7deff9e7462463" }, |
|||
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, |
|||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" }, |
|||
"vimtex": { "branch": "master", "commit": "a80934749c69cc6875b3c9b13ef59573a4824fb2" } |
|||
} |
@ -0,0 +1,12 @@ |
|||
local M = {} |
|||
function M.config() |
|||
-- vim.g.vimtex_view_general_viewer = "open" |
|||
-- vim.g.vimtex_view_general_options = "" |
|||
vim.g.vimtex_view_method = "zathura" |
|||
vim.g.tex_flavor="latex" |
|||
vim.g.vimtex_view_method="zathura" |
|||
vim.g.vimtex_quickfix_mode=0 |
|||
vim.cmd "highlight! Conceal guifg=white" |
|||
end |
|||
return M |
|||
|
@ -1,111 +1,114 @@ |
|||
vim.g.mapleader = ';' |
|||
vim.g.mapleader = ";" |
|||
|
|||
local function set_bg_light() |
|||
vim.cmd('set background=light') |
|||
local colors_name = vim.g.colors_name |
|||
vim.cmd('colorscheme shine') |
|||
vim.cmd('colorscheme ' .. colors_name) |
|||
vim.cmd("set background=light") |
|||
end |
|||
|
|||
local function set_bg_dark() |
|||
vim.cmd('set background=dark') |
|||
local colors_name = vim.g.colors_name |
|||
vim.cmd('colorscheme ron') |
|||
vim.cmd('colorscheme ' .. colors_name) |
|||
vim.cmd("set background=dark") |
|||
end |
|||
|
|||
-- keymaps |
|||
vim.keymap.set('i', '<C-g>', '<esc>') |
|||
vim.keymap.set('i', '<M-n>', '<up>') |
|||
vim.keymap.set('i', '<M-p>', '<down>') |
|||
vim.keymap.set('i', '<M-f>', '<right>') |
|||
vim.keymap.set('i', '<M-b>', '<left>') |
|||
vim.keymap.set('n', '<M-n>', '<down>') |
|||
vim.keymap.set('n', '<M-p>', '<up>') |
|||
vim.keymap.set('n', '<M-f>', '<right>') |
|||
vim.keymap.set('n', '<M-b>', '<left>') |
|||
vim.keymap.set('i', '<C-;>', '::') -- for C++ and Rust |
|||
vim.keymap.set('n', '<leader>vl', set_bg_light) |
|||
vim.keymap.set('n', '<leader>vd', set_bg_dark) |
|||
vim.keymap.set('n', '<leader>', ':') |
|||
vim.keymap.set("i", "<C-g>", "<esc>") |
|||
vim.keymap.set("i", "<M-n>", "<up>") |
|||
vim.keymap.set("i", "<M-p>", "<down>") |
|||
vim.keymap.set("i", "<M-f>", "<right>") |
|||
vim.keymap.set("i", "<M-b>", "<left>") |
|||
vim.keymap.set("n", "<M-n>", "<down>") |
|||
vim.keymap.set("n", "<M-p>", "<up>") |
|||
vim.keymap.set("n", "<M-f>", "<right>") |
|||
vim.keymap.set("n", "<M-b>", "<left>") |
|||
vim.keymap.set("i", "<C-;>", "::") -- for C++ and Rust and Haskell, etc. |
|||
vim.keymap.set("n", "<leader>vl", set_bg_light) |
|||
vim.keymap.set("n", "<leader>vd", set_bg_dark) |
|||
vim.keymap.set("n", "<leader>", ":") |
|||
|
|||
local ls = require("luasnip") |
|||
vim.keymap.set({"i"}, "<C-K>", function() ls.expand() end, {silent = true}) |
|||
vim.keymap.set({"i", "s"}, "<C-L>", function() ls.jump( 1) end, {silent = true}) |
|||
vim.keymap.set({"i", "s"}, "<C-J>", function() |
|||
if ls.choice_active() then |
|||
ls.change_choice(1) |
|||
end |
|||
end, {silent = true}) |
|||
|
|||
-- f: file tree |
|||
vim.keymap.set('n', '<F3>', ':NvimTreeToggle<cr>') |
|||
vim.keymap.set('n', '<leader>ft', ':NvimTreeToggle<cr>') |
|||
vim.keymap.set("n", "<F3>", ":NvimTreeToggle<cr>") |
|||
vim.keymap.set("n", "<leader>ft", ":NvimTreeToggle<cr>") |
|||
|
|||
-- y: telescope |
|||
local telescope = require 'telescope.builtin' |
|||
vim.keymap.set('n', '<F9>', function() telescope.find_files {} end) |
|||
vim.keymap.set('n', '<F10>', function() telescope.git_files {} end) |
|||
vim.keymap.set('n', '<F11>', function() telescope.buffers {} end) |
|||
vim.keymap.set({ 'n', 'i' }, '<C-p>', function() telescope.registers {} end) |
|||
local telescope = require "telescope.builtin" |
|||
vim.keymap.set("n", "<F9>", function() telescope.find_files {} end) |
|||
vim.keymap.set("n", "<F10>", function() telescope.git_files {} end) |
|||
vim.keymap.set("n", "<F11>", function() telescope.buffers {} end) |
|||
vim.keymap.set({ "n", "i" }, "<C-p>", function() telescope.registers {} end) |
|||
-- w: window |
|||
vim.keymap.set('n', '<leader>w1', '<c-w>o') |
|||
vim.keymap.set('n', '<leader>wx', ':x<cr>') |
|||
vim.keymap.set('n', '<leader>w2', ':sp<cr>') |
|||
vim.keymap.set('n', '<leader>w3', ':vs<cr>') |
|||
vim.keymap.set("n", "<leader>w1", "<c-w>o") |
|||
vim.keymap.set("n", "<leader>wx", ":x<cr>") |
|||
vim.keymap.set("n", "<leader>w2", ":sp<cr>") |
|||
vim.keymap.set("n", "<leader>w3", ":vs<cr>") |
|||
-- window resize |
|||
vim.keymap.set('n', '<m-9>', '<c-w><') |
|||
vim.keymap.set('n', '<m-0>', '<c-w>>') |
|||
vim.keymap.set('n', '<m-->', '<c-w>-') |
|||
vim.keymap.set('n', '<m-=>', '<c-w>+') |
|||
vim.keymap.set("n", "<m-9>", "<c-w><") |
|||
vim.keymap.set("n", "<m-0>", "<c-w>>") |
|||
vim.keymap.set("n", "<m-->", "<c-w>-") |
|||
vim.keymap.set("n", "<m-=>", "<c-w>+") |
|||
-- b: buffer |
|||
vim.keymap.set('n', '<leader>bn', ':bn<cr>') |
|||
vim.keymap.set('n', '<leader>bp', ':bp<cr>') |
|||
vim.keymap.set('n', '<leader>bd', ':Bdelete<cr>') |
|||
vim.keymap.set("n", "<leader>bn", ":bn<cr>") |
|||
vim.keymap.set("n", "<leader>bp", ":bp<cr>") |
|||
vim.keymap.set("n", "<leader>bd", ":Bdelete<cr>") |
|||
-- p: plugins |
|||
vim.keymap.set('n', '<leader>pi', ':PackerInstall<cr>') |
|||
vim.keymap.set('n', '<leader>pc', ':PackerClean<cr>') |
|||
vim.keymap.set("n", "<leader>pi", ":PackerInstall<cr>") |
|||
vim.keymap.set("n", "<leader>pc", ":PackerClean<cr>") |
|||
-- s: search |
|||
vim.keymap.set('n', '<leader>ss', '/') |
|||
vim.keymap.set('n', '<leader>sw', '/\\<lt>\\><left><left>') |
|||
vim.keymap.set("n", "<leader>ss", "/") |
|||
vim.keymap.set("n", "<leader>sw", "/\\<lt>\\><left><left>") |
|||
-- l/g/w: language |
|||
-- l: general |
|||
-- g: goto |
|||
-- w: workspace |
|||
-- e: diagnostics |
|||
vim.keymap.set('n', '<leader>ee', ':Lspsaga show_line_diagnostics<cr>') |
|||
vim.keymap.set('n', '<leader>ef', ':Lspsaga show_cursor_diagnostics<cr>') |
|||
vim.keymap.set('n', '<leader>el', ':TroubleToggle<cr>') -- Show list of diagnostics across the workspace |
|||
vim.keymap.set('n', '<leader>et', ':Trouble<cr>') -- Focus onto the trouble window |
|||
vim.keymap.set('n', '<leader>lq', vim.diagnostic.setloclist) |
|||
vim.keymap.set('n', '<leader>lk', ':Lspsaga hover_doc<cr>') |
|||
vim.keymap.set('n', '<leader>ld', ':Lspsaga preview_definition<cr>') |
|||
vim.keymap.set('n', '<leader>lr', ':Lspsaga rename<cr>') |
|||
vim.keymap.set('n', '<leader>lh', vim.lsp.buf.signature_help) |
|||
vim.keymap.set('n', '<leader>lf', function() vim.lsp.buf.format { async = true } end) |
|||
vim.keymap.set('n', '<leader>la', ':Lspsaga code_action<cr>') |
|||
vim.keymap.set('n', '<F12>', ':Lspsaga code_action<cr>') |
|||
vim.keymap.set("n", "<leader>ee", ":Lspsaga show_line_diagnostics<cr>") |
|||
vim.keymap.set("n", "<leader>ef", ":Lspsaga show_cursor_diagnostics<cr>") |
|||
vim.keymap.set("n", "<leader>el", ":TroubleToggle<cr>") -- Show list of diagnostics across the workspace |
|||
vim.keymap.set("n", "<leader>et", ":Trouble<cr>") -- Focus onto the trouble window |
|||
vim.keymap.set("n", "<leader>lq", vim.diagnostic.setloclist) |
|||
vim.keymap.set("n", "<leader>lk", ":Lspsaga hover_doc<cr>") |
|||
vim.keymap.set("n", "<leader>ld", ":Lspsaga preview_definition<cr>") |
|||
vim.keymap.set("n", "<leader>lr", ":Lspsaga rename<cr>") |
|||
vim.keymap.set("n", "<leader>lh", vim.lsp.buf.signature_help) |
|||
vim.keymap.set("n", "<leader>lf", function() vim.lsp.buf.format { async = true } end) |
|||
vim.keymap.set("n", "<leader>la", ":Lspsaga code_action<cr>") |
|||
vim.keymap.set("n", "<F12>", ":Lspsaga code_action<cr>") |
|||
|
|||
vim.keymap.set('n', '<leader>gd', ':Glance definitions<CR>') |
|||
vim.keymap.set('n', '<F4>', ':Glance references<CR>') |
|||
vim.keymap.set('n', '<leader>gt', ':Glance type_definitions<CR>') |
|||
vim.keymap.set('n', '<leader>gi', ':Glance implementations<CR>') |
|||
vim.keymap.set('n', '<leader>gN', ':Lspsaga diagnostic_jump_prev<cr>') |
|||
vim.keymap.set('n', '<leader>gn', ':Lspsaga diagnostic_jump_next<cr>') |
|||
vim.keymap.set("n", "<leader>gd", ":Glance definitions<CR>") |
|||
vim.keymap.set("n", "<F4>", ":Glance references<CR>") |
|||
vim.keymap.set("n", "<leader>gt", ":Glance type_definitions<CR>") |
|||
vim.keymap.set("n", "<leader>gi", ":Glance implementations<CR>") |
|||
vim.keymap.set("n", "<leader>gN", ":Lspsaga diagnostic_jump_prev<cr>") |
|||
vim.keymap.set("n", "<leader>gn", ":Lspsaga diagnostic_jump_next<cr>") |
|||
|
|||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder) |
|||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder) |
|||
vim.keymap.set('n', '<leader>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) |
|||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder) |
|||
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder) |
|||
vim.keymap.set("n", "<leader>wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) |
|||
|
|||
-- t: terminal |
|||
-- use <f5> to toggle terminal, this can be set in lua/configs/terminal.lua |
|||
-- the default position is also set in lua/configs/terminal.lua |
|||
local terminal = require('toggleterm.terminal') |
|||
vim.keymap.set('t', '<C-g>', '<C-\\><C-n>') |
|||
vim.keymap.set('n', '<leader>tt', ':ToggleTerm direction=tab<cr>') |
|||
vim.keymap.set('n', '<leader>tn', function() terminal.Terminal:new():toggle() end) |
|||
vim.keymap.set('n', '<leader>tf', ':ToggleTerm direction=float<cr>') |
|||
vim.keymap.set('n', '<leader>th', ':ToggleTerm direction=horizontal<cr>') |
|||
vim.keymap.set('n', '<leader>tv', ':ToggleTerm direction=vertical<cr>') |
|||
local terminal = require("toggleterm.terminal") |
|||
vim.keymap.set("t", "<C-g>", "<C-\\><C-n>") |
|||
vim.keymap.set("n", "<leader>tt", ":ToggleTerm direction=tab<cr>") |
|||
vim.keymap.set("n", "<leader>tn", function() terminal.Terminal:new():toggle() end) |
|||
vim.keymap.set("n", "<leader>tf", ":ToggleTerm direction=float<cr>") |
|||
vim.keymap.set("n", "<leader>th", ":ToggleTerm direction=horizontal<cr>") |
|||
vim.keymap.set("n", "<leader>tv", ":ToggleTerm direction=vertical<cr>") |
|||
|
|||
-- h: git |
|||
vim.keymap.set('n', '<leader>hu', ':Gitsigns undo_stage_hunk<cr>') |
|||
vim.keymap.set('n', '<leader>hn', ':Gitsigns next_hunk<cr>') |
|||
vim.keymap.set('n', '<leader>hN', ':Gitsigns next_hunk<cr>') |
|||
vim.keymap.set('n', '<leader>hc', ':Gitsigns preview_hunk<cr>') |
|||
vim.keymap.set('n', '<leader>hr', ':Gitsigns reset_hunk<cr>') |
|||
vim.keymap.set('n', '<leader>hR', ':Gitsigns reset_buffer') |
|||
vim.keymap.set('n', '<leader>hb', ':Gitsigns blame_line<cr>') |
|||
vim.keymap.set('n', '<leader>hd', ':Gitsigns diffthis<cr>') |
|||
vim.keymap.set('n', '<leader>hs', ':<C-U>Gitsigns select_hunk<CR>') |
|||
vim.keymap.set("n", "<leader>hu", ":Gitsigns undo_stage_hunk<cr>") |
|||
vim.keymap.set("n", "<leader>hn", ":Gitsigns next_hunk<cr>") |
|||
vim.keymap.set("n", "<leader>hN", ":Gitsigns next_hunk<cr>") |
|||
vim.keymap.set("n", "<leader>hc", ":Gitsigns preview_hunk<cr>") |
|||
vim.keymap.set("n", "<leader>hr", ":Gitsigns reset_hunk<cr>") |
|||
vim.keymap.set("n", "<leader>hR", ":Gitsigns reset_buffer") |
|||
vim.keymap.set("n", "<leader>hb", ":Gitsigns blame_line<cr>") |
|||
vim.keymap.set("n", "<leader>hd", ":Gitsigns diffthis<cr>") |
|||
vim.keymap.set("n", "<leader>hs", ":<C-U>Gitsigns select_hunk<CR>") |
|||
|
@ -0,0 +1,21 @@ |
|||
snippet be "begin{} / end{}" bA |
|||
\begin{$1} |
|||
$0 |
|||
\end{$1} |
|||
|
|||
snippet al "begin{align} / end{align}" bA |
|||
\begin{align} |
|||
$0 |
|||
\end{align} |
|||
|
|||
snippet bf "{\bf ...}" bA |
|||
{\bf $1}$0 |
|||
|
|||
snippet it "{\it ...}" bA |
|||
{\it $1}$0 |
|||
|
|||
snippet un "{\it ...}" bA |
|||
{\un $1}$0 |
|||
|
|||
snippet fr "\frac {} {}" bA |
|||
\frac {$1} {$2}$0 |
Loading…
Reference in new issue