Unused Plugins removed, streamlined environment

This commit is contained in:
Thomas Naderer
2025-01-28 13:42:43 +01:00
parent 856c2fa7a1
commit 0453e7fef6
6 changed files with 148 additions and 78 deletions

0
nvim/lua/completions.lua Normal file
View File

View File

@@ -104,8 +104,23 @@ keymap("c", "w!!", [[w !sudo tee %]], opt)
-- diff since last save -- diff since last save
keymap("n", "<leader>df", [[:w !diff % -<cr>]], opt) keymap("n", "<leader>df", [[:w !diff % -<cr>]], opt)
keymap("x", "<leader>df", [[:w !diff % -<cr>]], opt)
keymap("n", "Y", '"+y', opt) keymap("x", "Y", '"+y', opt)
keymap("n", "<leader>y", '"+y', opt) keymap("n", "<leader>y", ':Yazi<cr>', opt)
-- place this in one of your configuration file(s)
local hop = require('hop')
local directions = require('hop.hint').HintDirection
vim.keymap.set('', 'f', function()
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true })
end, {remap=true})
vim.keymap.set('', 'F', function()
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true })
end, {remap=true})
vim.keymap.set('', 't', function()
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })
end, {remap=true})
vim.keymap.set('', 'T', function()
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })
end, {remap=true})

View File

@@ -19,16 +19,6 @@ require('packer').startup(function(use)
}) })
-- }}} -- }}}
-- {{{ Headlines for Markdown and TeX
use {
'lukas-reineke/headlines.nvim',
after = 'nvim-treesitter',
config = function()
require('headlines').setup()
end,
}
-- }}}
-- {{{ Nvim-Tree -- {{{ Nvim-Tree
use { use {
'nvim-tree/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
@@ -67,6 +57,12 @@ require('packer').startup(function(use)
requires = { 'kyazdani42/nvim-web-devicons', opt = true } -- Optional icons requires = { 'kyazdani42/nvim-web-devicons', opt = true } -- Optional icons
} }
require('plugins.lualine') require('plugins.lualine')
-- Override background transparency with custom highlights
vim.cmd [[
highlight lualine_a_normal guibg=NONE
highlight lualine_b_normal guibg=NONE
highlight lualine_c_normal guibg=NONE
]]
-- }}} -- }}}
-- {{{ HardTime -- {{{ HardTime
@@ -84,13 +80,6 @@ require('packer').startup(function(use)
use 'junegunn/fzf.vim' use 'junegunn/fzf.vim'
-- }}} -- }}}
-- {{{ Cool Startup Dashboard
use {
'glepnir/dashboard-nvim',
requires = { 'kyazdani42/nvim-web-devicons' }
}
-- }}}
-- {{{ Productivity -- {{{ Productivity
use 'numToStr/Comment.nvim' use 'numToStr/Comment.nvim'
use 'windwp/nvim-autopairs' use 'windwp/nvim-autopairs'
@@ -139,4 +128,32 @@ require('packer').startup(function(use)
{ noremap = true, silent = true }) { noremap = true, silent = true })
end end
} }
-- }}}
-- Yazi.nvim {{{
use({
"mikavilpas/yazi.nvim",
config = function()
require("yazi").setup({
open_for_directories = false,
keymaps = {
show_help = "<F1>",
},
})
end,
})
--- }}}
use {
'phaazon/hop.nvim',
branch = 'v2', -- optional but strongly recommended
config = function()
-- you can configure Hop the way you like here; see :h hop-config
require'hop'.setup { keys = 'etovxqpdygfblzhckisuran' }
end
}
end) end)
require'hop'.setup()

View File

@@ -1,7 +1,55 @@
local M = {}
M.theme = function()
local colors = {
darkgray = "#16161d",
gray = "#727169",
innerbg = nil,
outerbg = "#16161D",
normal = "#7e9cd8",
insert = "#98bb6c",
visual = "#ffa066",
replace = "#e46876",
command = "#e6c384",
}
return {
inactive = {
a = { fg = colors.gray, bg = colors.outerbg, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
visual = {
a = { fg = colors.darkgray, bg = colors.visual, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
replace = {
a = { fg = colors.darkgray, bg = colors.replace, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
normal = {
a = { fg = colors.darkgray, bg = colors.normal, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
insert = {
a = { fg = colors.darkgray, bg = colors.insert, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
command = {
a = { fg = colors.darkgray, bg = colors.command, gui = "bold" },
b = { fg = colors.gray, bg = colors.outerbg },
c = { fg = colors.gray, bg = colors.innerbg },
},
}
end
require('lualine').setup { require('lualine').setup {
options = { options = {
icons_enabled = true, icons_enabled = true,
theme = 'auto', theme = M.theme(), -- Apply the custom theme
component_separators = { left = '', right = '' }, component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }, section_separators = { left = '', right = '' },
disabled_filetypes = { disabled_filetypes = {
@@ -18,25 +66,8 @@ require('lualine').setup {
winbar = 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 = {}, tabline = {},
winbar = {}, winbar = {},
inactive_winbar = {}, inactive_winbar = {},
extensions = {} extensions = {}
} }

View File

@@ -41,6 +41,12 @@ vim.api.nvim_create_user_command(
'!grep -i error %.log || echo "No errors found!"', '!grep -i error %.log || echo "No errors found!"',
{ nargs = 0 } { nargs = 0 }
) )
vim.api.nvim_create_user_command(
'CleanAuxFiles',
'!rm -f *.aux *.log *.out *.toc *.bbl *.blg *.synctex.gz *.fls *.fdb_latexmk',
{ nargs = 0 }
)
-- Keybindings for TeX Workflow -- Keybindings for TeX Workflow
vim.keymap.set('n', '<leader>ll', ':LuaTeX<CR>', { noremap = true, silent = true }) vim.keymap.set('n', '<leader>ll', ':LuaTeX<CR>', { noremap = true, silent = true })
@@ -48,3 +54,4 @@ 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>lp', ':PdfLaTeX<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<leader>lv', ':ViewPDF<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 }) vim.keymap.set('n', '<leader>le', ':CheckErrors<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<leader>lc', ':CleanAuxFiles<CR>', { noremap = true, silent = true })

View File

@@ -4,7 +4,7 @@ vim.opt.shiftwidth = 4 -- Number of spaces for indentation
vim.opt.expandtab = true -- Use spaces instead of tabs vim.opt.expandtab = true -- Use spaces instead of tabs
-- Coloscheme -- Coloscheme
vim.cmd [[colorscheme tokyonight]] vim.cmd [[colorscheme gruvbox]]
vim.cmd [[set spelllang=en]] vim.cmd [[set spelllang=en]]