Working NeoVim-Configuration, this should be the base for further
enhancements
This commit is contained in:
42
nvim/lua/plugins/lualine.lua
Normal file
42
nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
|
||||
73
nvim/lua/plugins/nvim-tree.lua
Normal file
73
nvim/lua/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
-- File: ~/.config/nvim/lua/plugins/nvim-tree.lua
|
||||
|
||||
-- Keybinding to toggle Nvim Tree
|
||||
vim.api.nvim_set_keymap('n', '<leader>e', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Nvim Tree Configuration
|
||||
require("nvim-tree").setup({
|
||||
view = {
|
||||
width = 35,
|
||||
side = "left",
|
||||
adaptive_size = true,
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = "l", action = "edit" },
|
||||
{ key = "h", action = "close_node" },
|
||||
{ key = "v", action = "vsplit" },
|
||||
{ key = "a", action = "create" },
|
||||
{ key = "d", action = "remove" },
|
||||
{ key = "r", action = "rename" },
|
||||
},
|
||||
},
|
||||
},
|
||||
renderer = {
|
||||
highlight_git = true,
|
||||
highlight_opened_files = "all",
|
||||
icons = {
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
folder = {
|
||||
arrow_closed = "",
|
||||
arrow_open = "",
|
||||
default = "",
|
||||
open = "",
|
||||
},
|
||||
git = {
|
||||
unstaged = "✗",
|
||||
staged = "✓",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "★",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = true,
|
||||
},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
},
|
||||
})
|
||||
25
nvim/lua/plugins/treesitter.lua
Normal file
25
nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "c", "lua", "python", "javascript", "markdown", "html", "css"}, -- Add languages you use
|
||||
sync_install = false, -- Install parsers asynchronously
|
||||
auto_install = true, -- Automatically install missing parsers
|
||||
|
||||
highlight = {
|
||||
enable = true, -- Enable syntax highlighting
|
||||
additional_vim_regex_highlighting = false, -- Avoid slow fallback regex highlighting
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true -- Enable indentation support
|
||||
},
|
||||
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
50
nvim/lua/plugins/vimtex.lua
Normal file
50
nvim/lua/plugins/vimtex.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
-- File: ~/.config/nvim/lua/plugins/vimtex.lua
|
||||
|
||||
-- VimTeX Configuration
|
||||
vim.g.vimtex_view_method = 'skim' -- Use Skim as the PDF viewer
|
||||
vim.g.vimtex_view_skim_sync = 1 -- Enable forward search with Skim
|
||||
vim.g.vimtex_view_skim_activate = 1 -- Activate Skim on compilation
|
||||
|
||||
vim.g.vimtex_compiler_method = 'latexmk' -- Use latexmk for LaTeX compilation
|
||||
vim.g.vimtex_quickfix_mode = 0 -- Disable automatic quickfix window
|
||||
vim.g.vimtex_syntax_enabled = 1 -- Enable VimTeX syntax highlighting
|
||||
|
||||
-- Custom TeX Engine Commands
|
||||
vim.api.nvim_create_user_command(
|
||||
'LuaTeX',
|
||||
'!lualatex %',
|
||||
{ nargs = 0 }
|
||||
)
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'XeTeX',
|
||||
'!xelatex %',
|
||||
{ nargs = 0 }
|
||||
)
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'PdfLaTeX',
|
||||
'!pdflatex %',
|
||||
{ nargs = 0 }
|
||||
)
|
||||
|
||||
-- View PDF Command
|
||||
vim.api.nvim_create_user_command(
|
||||
'ViewPDF',
|
||||
'!open -a Skim ' .. vim.fn.expand('%:r') .. '.pdf',
|
||||
{ nargs = 0 }
|
||||
)
|
||||
|
||||
-- Check for Errors in Log File
|
||||
vim.api.nvim_create_user_command(
|
||||
'CheckErrors',
|
||||
'!grep -i error %.log || echo "No errors found!"',
|
||||
{ nargs = 0 }
|
||||
)
|
||||
|
||||
-- Keybindings for TeX Workflow
|
||||
vim.keymap.set('n', '<leader>ll', ':LuaTeX<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>lx', ':XeTeX<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>lp', ':PdfLaTeX<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>lv', ':ViewPDF<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>le', ':CheckErrors<CR>', { noremap = true, silent = true })
|
||||
Reference in New Issue
Block a user