Browse Source

Add latex editing stuff (among other stuff)

main
Leslie Kerman 6 months ago
parent
commit
8269fa1d12
  1. 46
      lazy-lock.json
  2. 144
      lua/configs/autocomplete.lua
  3. 12
      lua/configs/latex.lua
  4. 12
      lua/core/init.lua
  5. 165
      lua/core/keymaps.lua
  6. 5
      lua/core/plugins.lua
  7. 65
      lua/core/theme.lua
  8. 21
      snippets/tex.snippets

46
lazy-lock.json

@ -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" }
}

144
lua/configs/autocomplete.lua

@ -2,69 +2,67 @@ local M = {}
function M.config()
-- Setup nvim-cmp.
local cmp = require 'cmp'
local cmp = require("cmp")
local luasnip = require("luasnip")
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
-- luasnip
require('luasnip').lsp_expand(args.body)
-- vsnip
-- vim.fn["vsnip#anonymous"](args.body)
-- snippy
-- require('snippy').expand_snippet(args.body)
-- ultisnip
-- vim.fn["UltiSnips#Anon"](args.body)
end,
},
mapping = {
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-y>'] = cmp.config.disable,
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
-- Accept currently selected item...
-- Set `select` to `false` to only confirm explicitly selected items:
['<CR>'] = cmp.mapping.confirm({ select = true }),
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, { { name = 'buffer' } })
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-n>"] = cmp.mapping(function(fallback)
if luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif cmp.visible() then
cmp.select_next_item()
end
end, { "i", "s" }),
["<C-p>"] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
elseif cmp.visible() then
cmp.select_prev_item()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' }
}, {
{ name = 'buffer' },
})
})
-- You can also set special config for specific filetypes:
-- cmp.setup.filetype('gitcommit', {
-- sources = cmp.config.sources({
-- { name = 'cmp_git' },
-- }, {
-- { name = 'buffer' },
-- })
-- })
-- nvim-cmp for commands
cmp.setup.cmdline('/', {
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local nlspsettings = require("nlspsettings")
@ -76,30 +74,8 @@ function M.config()
loader = 'json'
})
cmp.setup({
mapping = {
["<C-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<C-p>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
})
require("luasnip.loaders.from_snipmate").lazy_load({paths = "~/.config/nvim/snippets/"})
local devicons = require('nvim-web-devicons')
cmp.register_source('devicons', {
complete = function(_, _, callback)
@ -115,22 +91,30 @@ function M.config()
end,
})
-- nvim-lspconfig config
-- Set up nvim-lspconfig.
-- List of all pre-configured LSP servers:
-- github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local servers = { 'pylsp', 'clangd', 'html', 'cssls' }
-- Servers without extra config
local servers = { 'pylsp', 'html', 'zls' }
local lspconfig = require('lspconfig')
for _, lsp in pairs(servers) do
lspconfig[lsp].setup {}
end
lspconfig.rust_analyzer.setup {
-- Servers with extra config
lspconfig['rust_analyzer'].setup {
settings = {
["rust-analyzer"] = {
procMacro = { enable = true },
}
}
}
lspconfig['clangd'].setup {
cmd = {'clangd', '-header-insertion=never' }
}
--- Set up LspSaga.
require("lspsaga").setup({
ui = {
-- This option only works in Neovim 0.9
@ -254,11 +238,11 @@ function M.config()
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
error = "",
warning = "",
hint = "",
information = "",
other = ""
other = "󰮍"
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}

12
lua/configs/latex.lua

@ -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

12
lua/core/init.lua

@ -73,7 +73,19 @@ require("configs.terminal").config()
require("configs.nvimtree").config()
require("configs.scrollbar").config()
require("configs.telescope").config()
require("configs.latex").config()
require("configs.lang.rust").config()
require("core.keymaps")
require("core.theme")
local list_snips = function()
local ft_list = require("luasnip").available()[vim.o.filetype]
local ft_snips = {}
for _, item in pairs(ft_list) do
ft_snips[item.trigger] = item.name
end
print(vim.inspect(ft_snips))
end
vim.api.nvim_create_user_command("SnipList", list_snips, {})

165
lua/core/keymaps.lua

@ -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>")

5
lua/core/plugins.lua

@ -15,6 +15,8 @@ require("lazy").setup({
"Th3Whit3Wolf/one-nvim",
"AlexvZyl/nordic.nvim",
"lewis6991/gitsigns.nvim",
"kaicataldo/material.vim",
"neanias/everforest-nvim",
-- basics
"kyazdani42/nvim-web-devicons",
@ -24,7 +26,7 @@ require("lazy").setup({
"akinsho/bufferline.nvim",
"moll/vim-bbye",
-- language
{ "lervag/vimtex", lazy = false },
"neovim/nvim-lspconfig",
"glepnir/lspsaga.nvim",
"hrsh7th/cmp-nvim-lsp",
@ -36,6 +38,7 @@ require("lazy").setup({
"nvim-treesitter/nvim-treesitter",
"simrat39/rust-tools.nvim",
"dnlhc/glance.nvim",
{ 'mrcjkb/haskell-tools.nvim', version = '^3', ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject', } ,},
"tamago324/nlsp-settings.nvim",
"folke/trouble.nvim",
"nvim-lualine/lualine.nvim",

65
lua/core/theme.lua

@ -3,60 +3,49 @@
-- themes with special settings
-- sonokai
--sonokai styles: default, atlantis, andromeda, shusia, maia, espresso
--vim.g.sonokai_style = 'default'
--vim.g.sonokai_enable_italic = 0
--vim.g.sonokai_disable_italic_comment = 0
--vim.cmd('colorscheme sonokai')
-- sonokai styles: default, atlantis, andromeda, shusia, maia, espresso
-- vim.g.sonokai_style = 'default'
-- vim.g.sonokai_enable_italic = 0
-- vim.g.sonokai_disable_italic_comment = 0
-- tokyo night
-- vim.g.tokyodark_transparent_background = false
--vim.g.tokyodark_enable_italic_comment = true
--vim.g.tokyodark_enable_italic = true
--vim.g.tokyodark_color_gamma = "1.0"
--vim.cmd("colorscheme tokyodark")
-- vim.g.tokyodark_enable_italic_comment = true
-- vim.g.tokyodark_enable_italic = true
-- vim.g.tokyodark_color_gamma = "1.0"
-- Change the "hint" color to the "orange" color, and make the "error" color bright red
--vim.g.tokyonight_colors = { hint = "orange", error = "#cb5550" }
--vim.cmd('colorscheme sonokai')
-- vim.g.tokyonight_colors = { hint = "orange", error = "#cb5550" }
-- space vim dark
-- vim.g.space_vim_dark_background = 234 -- 234 (darkest) ~ 238 (lightest)
-- vim.cmd("colorscheme space-vim-dark");
-- kanagwa
-- Default options:
--require('kanagawa').setup({
-- undercurl = true, -- enable undercurls
-- commentStyle = { italic = true },
-- functionStyle = {},
-- keywordStyle = { italic = true},
-- statementStyle = { bold = true },
-- typeStyle = {},
-- variablebuiltinStyle = { italic = true},
-- specialReturn = true, -- special highlight for the return keyword
-- specialException = true, -- special highlight for exception handling keywords
-- transparent = false, -- do not set background color
-- dimInactive = false, -- dim inactive window `:h hl-NormalNC`
-- globalStatus = false, -- adjust window separators highlight for laststatus=3
-- colors = {},
-- overrides = {},
--})
--vim.cmd("colorscheme kanagawa")
-- require('kanagawa').setup({
-- undercurl = true, -- enable undercurls
-- commentStyle = { italic = true },
-- functionStyle = {},
-- keywordStyle = { italic = true},
-- statementStyle = { bold = true },
-- typeStyle = {},
-- variablebuiltinStyle = { italic = true},
-- specialReturn = true, -- special highlight for the return keyword
-- specialException = true, -- special highlight for exception handling keywords
-- transparent = false, -- do not set background color
-- dimInactive = false, -- dim inactive window `:h hl-NormalNC`
-- globalStatus = false, -- adjust window separators highlight for laststatus=3
-- colors = {},
-- overrides = {},
-- })
-- edge
-- vim.g.edge_style = 'aura' -- neon, aura
-- vim.g.edge_better_performance = 1
-- vim.cmd("colorscheme edge")
-- github
-- vim.cmd("colorscheme github_dark_high_contrast")
-- material
-- vim.g.material_theme_style = 'darker'
-- oxocarbon
-- vim.cmd("colorscheme oxocarbon")
-- nordic
vim.cmd("colorscheme sonokai")
vim.cmd("colorscheme edge")
vim.cmd("set background=dark")

21
snippets/tex.snippets

@ -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…
Cancel
Save