Unused Plugins removed, streamlined environment
This commit is contained in:
0
nvim/lua/completions.lua
Normal file
0
nvim/lua/completions.lua
Normal 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})
|
||||||
|
|||||||
@@ -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'
|
||||||
@@ -123,20 +112,48 @@ require('packer').startup(function(use)
|
|||||||
use 'hrsh7th/cmp-nvim-lsp'
|
use 'hrsh7th/cmp-nvim-lsp'
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Telescope
|
-- {{{ Telescope
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = { {'nvim-lua/plenary.nvim'} },
|
requires = { {'nvim-lua/plenary.nvim'} },
|
||||||
config = function()
|
config = function()
|
||||||
-- Leader key mappings for Telescope
|
-- Leader key mappings for Telescope
|
||||||
vim.api.nvim_set_keymap('n', '<leader>ff', ':Telescope find_files<CR>'
|
vim.api.nvim_set_keymap('n', '<leader>ff', ':Telescope find_files<CR>'
|
||||||
, { noremap = true, silent = true })
|
, { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap('n', '<leader>fg', ':Telescope live_grep<CR>',
|
vim.api.nvim_set_keymap('n', '<leader>fg', ':Telescope live_grep<CR>',
|
||||||
{ noremap = true, silent = true })
|
{ noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap('n', '<leader>fb', ':Telescope buffers<CR>', {
|
vim.api.nvim_set_keymap('n', '<leader>fb', ':Telescope buffers<CR>', {
|
||||||
noremap = true, silent = true })
|
noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap('n', '<leader>fh', ':Telescope help_tags<CR>',
|
vim.api.nvim_set_keymap('n', '<leader>fh', ':Telescope help_tags<CR>',
|
||||||
{ 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()
|
||||||
|
|||||||
@@ -1,42 +1,73 @@
|
|||||||
require('lualine').setup {
|
local M = {}
|
||||||
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 = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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 {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = M.theme(), -- Apply the custom theme
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 })
|
||||||
|
|||||||
@@ -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]]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user