Compare commits
2 Commits
a8dc526720
...
dd12fee249
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd12fee249 | ||
|
|
f1e79ee50e |
@@ -94,13 +94,25 @@ window:
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
|
||||
# Decorations theme variant (Linux/BSD only)
|
||||
# Decorations theme variant
|
||||
#
|
||||
# Override the variant of the GTK theme/Wayland client side decorations.
|
||||
# Commonly supported values are `dark` and `light`. Set this to `None` to use
|
||||
# the default theme variant.
|
||||
# Override the variant of the System theme/GTK theme/Wayland client side
|
||||
# decorations. Commonly supported values are `Dark`, `Light`, and `None` for
|
||||
# auto pick-up. Set this to `None` to use the default theme variant.
|
||||
#decorations_theme_variant: None
|
||||
|
||||
# Resize increments
|
||||
#
|
||||
# Prefer resizing window by discrete steps equal to cell dimensions.
|
||||
#resize_increments: false
|
||||
|
||||
# Make `Option` key behave as `Alt` (macOS only):
|
||||
# - OnlyLeft
|
||||
# - OnlyRight
|
||||
# - Both
|
||||
# - None (default)
|
||||
#option_as_alt: None
|
||||
|
||||
#scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
@@ -158,7 +170,7 @@ font:
|
||||
style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 8.0
|
||||
size: 9.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
@@ -449,9 +461,6 @@ font:
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
# Offer IPC using `alacritty msg` (unix only)
|
||||
#ipc_socket: true
|
||||
|
||||
@@ -615,6 +624,7 @@ hints:
|
||||
# - Quit
|
||||
# Quit Alacritty.
|
||||
# - ToggleFullscreen
|
||||
# - ToggleMaximized
|
||||
# - SpawnNewInstance
|
||||
# Spawn a new instance of Alacritty.
|
||||
# - CreateNewWindow
|
||||
@@ -866,7 +876,7 @@ key_bindings:
|
||||
#- { key: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { key: N, mods: Command, action: CreateNewWindow }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
|
||||
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
|
||||
|
||||
@@ -99,3 +99,11 @@ map('n', '<C-w>z', "<cmd> WindowsMaximize<cr>")
|
||||
map('n', '<C-w>_', "<cmd> WindowsMaximizeVertically<cr>")
|
||||
map('n', '<C-w>|', "<cmd> WindowsMaximizeHorizontally<cr>")
|
||||
map('n', '<C-w>=', "<cmd WindowsEqualize<cr>")
|
||||
|
||||
-- specs
|
||||
-- You can even bind it to search jumping and more, example:
|
||||
vim.api.nvim_set_keymap('n', 'n', 'n:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Or maybe you do a lot of screen-casts and want to call attention to a specific line of code:
|
||||
vim.api.nvim_set_keymap('n', '<leader>v', ':lua require("specs").show_specs({width = 97, winhl = "Search", delay_ms = 610, inc_ms = 21})<CR>', { noremap = true, silent = true })
|
||||
|
||||
@@ -82,7 +82,7 @@ return {
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
delay = 5000,
|
||||
ignore_whitespace = true,
|
||||
},
|
||||
current_line_blame_formatter_opts = {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
return {
|
||||
'nyngwang/murmur.lua',
|
||||
config = function()
|
||||
--require('illuminate').configure({
|
||||
-- large_file_cutoff = 3000
|
||||
--})
|
||||
|
||||
HIGHLIGHT = 'highlight'
|
||||
vim.api.nvim_create_augroup(HIGHLIGHT, { clear = true })
|
||||
|
||||
@@ -44,4 +40,10 @@ return {
|
||||
end
|
||||
})
|
||||
end
|
||||
-- 'tzachar/local-highlight.nvim',
|
||||
-- config = function()
|
||||
-- require('local-highlight').setup({
|
||||
-- file_types = {'python', 'cpp', 'rust', 'lua', 'cmake'}
|
||||
-- })
|
||||
-- end
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ return {{
|
||||
-- }}}
|
||||
|
||||
-- Git integration {{{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
"tpope/vim-fugitive",
|
||||
-- }}}
|
||||
|
||||
@@ -77,14 +76,14 @@ return {{
|
||||
"fenetikm/falcon",
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- vim.cmd([[ colorscheme falcon]])
|
||||
vim.cmd([[ colorscheme falcon]])
|
||||
end
|
||||
},
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.cmd([[ colorscheme kanagawa]])
|
||||
--vim.cmd([[ colorscheme kanagawa]])
|
||||
end
|
||||
},
|
||||
-- }}}
|
||||
@@ -107,8 +106,6 @@ return {{
|
||||
"ziontee113/icon-picker.nvim",
|
||||
"cbochs/grapple.nvim",
|
||||
"shortcuts/no-neck-pain.nvim",
|
||||
"edluffy/specs.nvim",
|
||||
{ 'ruifm/gitlinker.nvim', dependencies = 'nvim-lua/plenary.nvim'},
|
||||
--'jinzhongjia/PS_manager.nvim',
|
||||
-- }}}
|
||||
}}
|
||||
|
||||
@@ -1,227 +0,0 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
-- Eviline config for lualine
|
||||
-- Author: shadmansaleh
|
||||
-- Credit: glepnir
|
||||
local lualine = require('lualine')
|
||||
|
||||
-- Color table for highlights
|
||||
-- stylua: ignore
|
||||
local colors = {
|
||||
bg = '#202328',
|
||||
fg = '#bbc2cf',
|
||||
yellow = '#ECBE7B',
|
||||
cyan = '#008080',
|
||||
darkblue = '#081633',
|
||||
green = '#98be65',
|
||||
orange = '#FF8800',
|
||||
violet = '#a9a1e1',
|
||||
magenta = '#c678dd',
|
||||
blue = '#51afef',
|
||||
red = '#ec5f67',
|
||||
}
|
||||
|
||||
|
||||
local conditions = {
|
||||
buffer_not_empty = function()
|
||||
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
||||
end,
|
||||
hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end,
|
||||
check_git_workspace = function()
|
||||
local filepath = vim.fn.expand('%:p:h')
|
||||
local gitdir = vim.fn.finddir('.git', filepath .. ';')
|
||||
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
||||
end,
|
||||
}
|
||||
|
||||
-- Config
|
||||
local config = {
|
||||
options = {
|
||||
-- Disable sections and component separators
|
||||
component_separators = '',
|
||||
section_separators = '',
|
||||
theme = {
|
||||
-- We are going to use lualine_c an lualine_x as left and
|
||||
-- right section. Both are highlighted by c theme . So we
|
||||
-- are just setting default looks o statusline
|
||||
normal = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
-- These will be filled later
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
inactive_sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
}
|
||||
|
||||
-- Inserts a component in lualine_c at left section
|
||||
local function ins_left(component)
|
||||
table.insert(config.sections.lualine_c, component)
|
||||
end
|
||||
|
||||
-- Inserts a component in lualine_x ot right section
|
||||
local function ins_right(component)
|
||||
table.insert(config.sections.lualine_x, component)
|
||||
end
|
||||
|
||||
ins_left {
|
||||
function()
|
||||
return '▊'
|
||||
end,
|
||||
color = { fg = colors.blue }, -- Sets highlighting of component
|
||||
padding = { left = 0, right = 1 }, -- We don't need space before this
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- mode component
|
||||
function()
|
||||
return ''
|
||||
end,
|
||||
color = function()
|
||||
-- auto change color according to neovims mode
|
||||
local mode_color = {
|
||||
n = colors.red,
|
||||
i = colors.green,
|
||||
v = colors.blue,
|
||||
[''] = colors.blue,
|
||||
V = colors.blue,
|
||||
c = colors.magenta,
|
||||
no = colors.red,
|
||||
s = colors.orange,
|
||||
S = colors.orange,
|
||||
[''] = colors.orange,
|
||||
ic = colors.yellow,
|
||||
R = colors.violet,
|
||||
Rv = colors.violet,
|
||||
cv = colors.red,
|
||||
ce = colors.red,
|
||||
r = colors.cyan,
|
||||
rm = colors.cyan,
|
||||
['r?'] = colors.cyan,
|
||||
['!'] = colors.red,
|
||||
t = colors.red,
|
||||
}
|
||||
return { fg = mode_color[vim.fn.mode()] }
|
||||
end,
|
||||
padding = { right = 1 },
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- filesize component
|
||||
'filesize',
|
||||
cond = conditions.buffer_not_empty,
|
||||
}
|
||||
|
||||
ins_left {
|
||||
'filename',
|
||||
cond = conditions.buffer_not_empty,
|
||||
color = { fg = colors.magenta, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_left { 'location' }
|
||||
|
||||
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
||||
|
||||
ins_left {
|
||||
'diagnostics',
|
||||
sources = { 'nvim_diagnostic' },
|
||||
symbols = { error = ' ', warn = ' ', info = ' ' },
|
||||
diagnostics_color = {
|
||||
color_error = { fg = colors.red },
|
||||
color_warn = { fg = colors.yellow },
|
||||
color_info = { fg = colors.cyan },
|
||||
},
|
||||
}
|
||||
|
||||
-- Insert mid section. You can make any number of sections in neovim :)
|
||||
-- for lualine it's any number greater then 2
|
||||
ins_left {
|
||||
function()
|
||||
return '%='
|
||||
end,
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- Lsp server name .
|
||||
function()
|
||||
local msg = 'No Active Lsp'
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end,
|
||||
icon = ' LSP:',
|
||||
color = { fg = '#ffffff', gui = 'bold' },
|
||||
}
|
||||
|
||||
-- Add components to right sections
|
||||
ins_right {
|
||||
'o:encoding', -- option component same as &encoding in viml
|
||||
fmt = string.upper, -- I'm not sure why it's upper case either ;)
|
||||
cond = conditions.hide_in_width,
|
||||
color = { fg = colors.green, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'fileformat',
|
||||
fmt = string.upper,
|
||||
icons_enabled = true, -- I think icons are cool but Eviline doesn't have them. sigh
|
||||
color = { fg = colors.green, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'branch',
|
||||
icon = '',
|
||||
color = { fg = colors.violet, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'diff',
|
||||
-- Is it me or the symbol for modified us really weird
|
||||
symbols = { added = ' ', modified = '柳 ', removed = ' ' },
|
||||
diff_color = {
|
||||
added = { fg = colors.green },
|
||||
modified = { fg = colors.orange },
|
||||
removed = { fg = colors.red },
|
||||
},
|
||||
cond = conditions.hide_in_width,
|
||||
}
|
||||
|
||||
ins_right {
|
||||
function()
|
||||
return '▊'
|
||||
end,
|
||||
color = { fg = colors.blue },
|
||||
padding = { left = 1 },
|
||||
}
|
||||
|
||||
-- Now don't forget to initialize lualine
|
||||
lualine.setup(config)
|
||||
end
|
||||
}
|
||||
16
.config/nvim/lua/plugins/null.lua
Normal file
16
.config/nvim/lua/plugins/null.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
config = function()
|
||||
null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
null_ls.builtins.diagnostics.cmake_lint,
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
null_ls.builtins.diagnostics.hadolint,
|
||||
null_ls.builtins.hover.dictionary},
|
||||
})
|
||||
end
|
||||
}
|
||||
22
.config/nvim/lua/plugins/specs.lua
Normal file
22
.config/nvim/lua/plugins/specs.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
'edluffy/specs.nvim',
|
||||
config = function()
|
||||
require('specs').setup{
|
||||
show_jumps = true,
|
||||
min_jump = 30,
|
||||
popup = {
|
||||
delay_ms = 0, -- delay before popup displays
|
||||
inc_ms = 10, -- time increments used for fade/resize effects
|
||||
blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
|
||||
width = 10,
|
||||
winhl = "PMenu",
|
||||
fader = require('specs').linear_fader,
|
||||
resizer = require('specs').shrink_resizer
|
||||
},
|
||||
ignore_filetypes = {},
|
||||
ignore_buftypes = {
|
||||
nofile = true,
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -15,6 +15,13 @@ return {
|
||||
ts.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
ensure_installed = {
|
||||
@@ -24,7 +31,7 @@ return {
|
||||
"bibtex",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
--"comment",
|
||||
"cpp",
|
||||
"devicetree",
|
||||
"diff",
|
||||
@@ -90,6 +97,6 @@ return {
|
||||
},
|
||||
}
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
'lukas-reineke/virt-column.nvim',
|
||||
config = true
|
||||
}
|
||||
Reference in New Issue
Block a user