General changes + vim changes
This commit is contained in:
@@ -60,11 +60,14 @@ tiling_drag modifier titlebar
|
|||||||
bindsym $mod+Return exec kitty
|
bindsym $mod+Return exec kitty
|
||||||
|
|
||||||
# start an app
|
# start an app
|
||||||
bindsym $mod+n exec kitty -- ldesk && exit
|
bindsym $mod+n exec kitty -- fzf-launcher && exit
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+q kill
|
bindsym $mod+q kill
|
||||||
|
|
||||||
|
# Enable compose key with caps lock
|
||||||
|
exec setxkbmap -option compose:caps
|
||||||
|
|
||||||
# start dmenu (a program launcher)
|
# start dmenu (a program launcher)
|
||||||
# bindsym $mod+d exec --no-startup-id dmenu_run
|
# bindsym $mod+d exec --no-startup-id dmenu_run
|
||||||
# A more modern dmenu replacement is rofi:
|
# A more modern dmenu replacement is rofi:
|
||||||
|
|||||||
@@ -1,47 +1,32 @@
|
|||||||
background #222222
|
## name: Gruvbox Dark
|
||||||
foreground #f7f1ff
|
## author: Pavel Pertsev
|
||||||
|
## license: MIT/X11
|
||||||
|
## upstream: https://raw.githubusercontent.com/gruvbox-community/gruvbox-contrib/master/kitty/gruvbox-dark.conf
|
||||||
|
|
||||||
cursor #f7f1ff
|
selection_foreground #ebdbb2
|
||||||
cursor_text_color #000000
|
selection_background #d65d0e
|
||||||
selection_foreground #363537
|
|
||||||
selection_background #f7f1ff
|
|
||||||
|
|
||||||
# dull black
|
background #282828
|
||||||
color0 #363537
|
foreground #ebdbb2
|
||||||
# light black
|
|
||||||
color8 #69676c
|
|
||||||
|
|
||||||
# dull red
|
color0 #3c3836
|
||||||
color1 #fc618d
|
color1 #cc241d
|
||||||
# light red
|
color2 #98971a
|
||||||
color9 #fc618d
|
color3 #d79921
|
||||||
|
color4 #458588
|
||||||
|
color5 #b16286
|
||||||
|
color6 #689d6a
|
||||||
|
color7 #a89984
|
||||||
|
color8 #928374
|
||||||
|
color9 #fb4934
|
||||||
|
color10 #b8bb26
|
||||||
|
color11 #fabd2f
|
||||||
|
color12 #83a598
|
||||||
|
color13 #d3869b
|
||||||
|
color14 #8ec07c
|
||||||
|
color15 #fbf1c7
|
||||||
|
|
||||||
# dull green
|
cursor #bdae93
|
||||||
color2 #7bd88f
|
cursor_text_color #665c54
|
||||||
# light green
|
|
||||||
color10 #7bd88f
|
|
||||||
|
|
||||||
# yellow
|
url_color #458588
|
||||||
color3 #fce566
|
|
||||||
# light yellow
|
|
||||||
color11 #fce566
|
|
||||||
|
|
||||||
# blue
|
|
||||||
color4 #fd9353
|
|
||||||
# light blue
|
|
||||||
color12 #fd9353
|
|
||||||
|
|
||||||
# magenta
|
|
||||||
color5 #948ae3
|
|
||||||
# light magenta
|
|
||||||
color13 #948ae3
|
|
||||||
|
|
||||||
# cyan
|
|
||||||
color6 #5ad4e6
|
|
||||||
# light cyan
|
|
||||||
color14 #5ad4e6
|
|
||||||
|
|
||||||
# dull white
|
|
||||||
color7 #f7f1ff
|
|
||||||
# bright white
|
|
||||||
color15 #f7f1ff
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ bold_italic_font JetBrains Mono Bold Italic
|
|||||||
#: italic_font Operator Mono Book Italic
|
#: italic_font Operator Mono Book Italic
|
||||||
#: bold_italic_font Operator Mono Medium Italic
|
#: bold_italic_font Operator Mono Medium Italic
|
||||||
|
|
||||||
font_size 12.0
|
font_size 12
|
||||||
|
|
||||||
#: Font size (in pts).
|
#: Font size (in pts).
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ cursor_blink_interval 0.5
|
|||||||
#: disable blinking. Negative values mean use system default. Note
|
#: disable blinking. Negative values mean use system default. Note
|
||||||
#: that the minimum interval will be limited to repaint_delay.
|
#: that the minimum interval will be limited to repaint_delay.
|
||||||
|
|
||||||
# cursor_stop_blinking_after 15.0
|
cursor_stop_blinking_after 10.0
|
||||||
|
|
||||||
#: Stop blinking cursor after the specified number of seconds of
|
#: Stop blinking cursor after the specified number of seconds of
|
||||||
#: keyboard inactivity. Set to zero to never stop blinking.
|
#: keyboard inactivity. Set to zero to never stop blinking.
|
||||||
@@ -2530,6 +2530,6 @@ enable_audio_bell no
|
|||||||
|
|
||||||
|
|
||||||
# BEGIN_KITTY_THEME
|
# BEGIN_KITTY_THEME
|
||||||
# Monokai Pro (Filter Spectrum)
|
# Gruvbox Dark
|
||||||
include current-theme.conf
|
include current-theme.conf
|
||||||
# END_KITTY_THEME
|
# END_KITTY_THEME
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
#: individual font faces and even specify special fonts for particular
|
#: individual font faces and even specify special fonts for particular
|
||||||
#: characters.
|
#: characters.
|
||||||
|
|
||||||
font_family JetBrainsMonoNL NFM Regular
|
font_family JetBrains Mono Regular
|
||||||
# bold_font auto
|
bold_font JetBrains Mono Bold
|
||||||
# italic_font auto
|
italic_font JetBrains Mono Italic
|
||||||
# bold_italic_font auto
|
bold_italic_font JetBrains Mono Bold Italic
|
||||||
|
|
||||||
#: You can specify different fonts for the bold/italic/bold-italic
|
#: You can specify different fonts for the bold/italic/bold-italic
|
||||||
#: variants. To get a full list of supported fonts use the `kitty
|
#: variants. To get a full list of supported fonts use the `kitty
|
||||||
@@ -24,7 +24,7 @@ font_family JetBrainsMonoNL NFM Regular
|
|||||||
#: italic_font Operator Mono Book Italic
|
#: italic_font Operator Mono Book Italic
|
||||||
#: bold_italic_font Operator Mono Medium Italic
|
#: bold_italic_font Operator Mono Medium Italic
|
||||||
|
|
||||||
font_size 12.0
|
font_size 12
|
||||||
|
|
||||||
#: Font size (in pts).
|
#: Font size (in pts).
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ cursor_blink_interval 0.5
|
|||||||
#: disable blinking. Negative values mean use system default. Note
|
#: disable blinking. Negative values mean use system default. Note
|
||||||
#: that the minimum interval will be limited to repaint_delay.
|
#: that the minimum interval will be limited to repaint_delay.
|
||||||
|
|
||||||
# cursor_stop_blinking_after 15.0
|
cursor_stop_blinking_after 10.0
|
||||||
|
|
||||||
#: Stop blinking cursor after the specified number of seconds of
|
#: Stop blinking cursor after the specified number of seconds of
|
||||||
#: keyboard inactivity. Set to zero to never stop blinking.
|
#: keyboard inactivity. Set to zero to never stop blinking.
|
||||||
@@ -734,7 +734,7 @@ cursor_blink_interval 0.5
|
|||||||
|
|
||||||
#: Terminal bell {{{
|
#: Terminal bell {{{
|
||||||
|
|
||||||
# enable_audio_bell yes
|
enable_audio_bell no
|
||||||
|
|
||||||
#: The audio bell. Useful to disable it in environments that require
|
#: The audio bell. Useful to disable it in environments that require
|
||||||
#: silence.
|
#: silence.
|
||||||
@@ -2527,3 +2527,9 @@ cursor_blink_interval 0.5
|
|||||||
#: }}}
|
#: }}}
|
||||||
|
|
||||||
#: }}}
|
#: }}}
|
||||||
|
|
||||||
|
|
||||||
|
# BEGIN_KITTY_THEME
|
||||||
|
# Monokai Pro (Filter Spectrum)
|
||||||
|
include current-theme.conf
|
||||||
|
# END_KITTY_THEME
|
||||||
|
|||||||
@@ -17,18 +17,16 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
|
|
||||||
require('BluePlum.set')
|
require('BluePlum.set')
|
||||||
require('BluePlum.keymap')
|
require('BluePlum.keymap')
|
||||||
|
require('BluePlum.neovide')
|
||||||
-- Lualine filename
|
require('BluePlum.utility')
|
||||||
local function hello()
|
|
||||||
return [[hello world]]
|
|
||||||
end
|
|
||||||
|
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- Plugins
|
-- Plugins
|
||||||
spec = {
|
spec = {
|
||||||
{ import = 'plugins' },
|
{ import = 'plugins' },
|
||||||
},
|
},
|
||||||
checker = { enabled = true },
|
checker = { enabled = false },
|
||||||
|
change_detection = { notify = false },
|
||||||
})
|
})
|
||||||
|
|
||||||
require('lsp')
|
require('lsp')
|
||||||
|
|||||||
@@ -1,29 +1,31 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "7552e6504ee95a9c8cfc6db53e389122ded46cd4" },
|
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
||||||
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
|
"actions-preview.nvim": { "branch": "master", "commit": "9f52a01c374318e91337697ebed51c6fae57f8a4" },
|
||||||
|
"baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" },
|
||||||
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
|
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
|
"compile-mode.nvim": { "branch": "main", "commit": "2bf8381871bf7a9dad347938ddef6b09a1735bdb" },
|
||||||
|
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
||||||
"formatter.nvim": { "branch": "fix-305-index-out-of-bounds", "commit": "a8a8b196c9ca37afa53f7ee30a98a343bbbca325" },
|
"formatter.nvim": { "branch": "fix-305-index-out-of-bounds", "commit": "a8a8b196c9ca37afa53f7ee30a98a343bbbca325" },
|
||||||
|
"gruber-darker.nvim": { "branch": "main", "commit": "a2dda61d9c1225e16951a51d6b89795b0ac35cd6" },
|
||||||
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
|
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
|
||||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" },
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
|
"lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
|
"lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
|
||||||
"markview.nvim": { "branch": "main", "commit": "d0ccc97b5c988fb28e5033abdf7b832b9dfaf897" },
|
"markview.nvim": { "branch": "main", "commit": "67b69cdaf9055bebac3682a070d7e5c8eecba29c" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "fd69d5c782a28420d51b648a3d7fe88df569d391" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "e6528f4613c8db2e04be908eb2b5886d63f62a98" },
|
"nvim-lspconfig": { "branch": "master", "commit": "ff69ecca55d83ffc70657f260a799f79a5637831" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "d7353a6b72008b38aa873ace49aa97bea257941b" },
|
"nvim-treesitter": { "branch": "master", "commit": "9b1e607298dd5fc2ee6549488324cc92dafb99c0" },
|
||||||
"nvim-ufo": { "branch": "main", "commit": "4cc3ba9303c0708b81fd681786a4835fd31518ac" },
|
"nvim-ufo": { "branch": "main", "commit": "203c9f434feec57909ab4b1e028abeb3349b7847" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
|
"nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" },
|
"oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"promise-async": { "branch": "main", "commit": "038d05664fedc920ba86720214c84a15ff7432b0" },
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
"rustaceanvim": { "branch": "master", "commit": "7da155a907e3f48b1f7c25c59e248996fba833df" },
|
"rustaceanvim": { "branch": "master", "commit": "d1f56672638508a7bc971cde31a29df4018579a9" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3b1600d0fd5172ad9fae00987362ca0ef3d8895d" },
|
"telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,3 +25,39 @@ vim.keymap.set('n', '<leader>l', ':e#<CR>')
|
|||||||
vim.keymap.set('n', '<leader>i', 'cc')
|
vim.keymap.set('n', '<leader>i', 'cc')
|
||||||
-- peek
|
-- peek
|
||||||
vim.keymap.set('n', '<leader>p', vim.lsp.buf.hover)
|
vim.keymap.set('n', '<leader>p', vim.lsp.buf.hover)
|
||||||
|
|
||||||
|
-- Scratch pad
|
||||||
|
vim.keymap.set(
|
||||||
|
'n',
|
||||||
|
'<leader>s',
|
||||||
|
':bo vs<CR>:enew<CR>:setlocal noswapfile<CR>:setlocal bufhidden=hide<CR>:setlocal buftype=nofile<CR>:set filetype=markdown<CR>:set syntax=markdown<CR>'
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Help
|
||||||
|
vim.cmd.cnoreabbrev('h vert h')
|
||||||
|
|
||||||
|
-- Windows
|
||||||
|
vim.keymap.set('n', '<leader>k', function()
|
||||||
|
if vim.bo.modified then
|
||||||
|
if Confirm('Buffer has unsaved changes; write?') then
|
||||||
|
vim.cmd.write()
|
||||||
|
vim.cmd.bdelete()
|
||||||
|
else
|
||||||
|
vim.cmd('bd!')
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.cmd.bdelete()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Comp mode
|
||||||
|
vim.keymap.set('n', '<leader>s', function() -- s: start
|
||||||
|
local command = Input('Enter compilation command > ', vim.g.last_compile_command)
|
||||||
|
if command then
|
||||||
|
vim.g.last_compile_command = command
|
||||||
|
vim.cmd.Compile(command)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>E', ':NextError<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>S', ':Recompile<CR>')
|
||||||
|
|||||||
24
.config/nvim/lua/BluePlum/neovide.lua
Normal file
24
.config/nvim/lua/BluePlum/neovide.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
if not vim.g.neovide then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.o.guifont = 'Jetbrains Mono:h17'
|
||||||
|
|
||||||
|
vim.g.neovide_underline_stroke_scale = 2.0
|
||||||
|
vim.g.neovide_theme = 'dark'
|
||||||
|
vim.g.neovide_refresh_rate_idle = 10
|
||||||
|
vim.g.neovide_transparency = 0.6
|
||||||
|
|
||||||
|
-- Scroll
|
||||||
|
vim.g.neovide_scroll_animation_length = 0.1
|
||||||
|
vim.g.neovide_scroll_animation_far_lines = 50
|
||||||
|
|
||||||
|
-- Cursor
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.03
|
||||||
|
vim.g.neovide_cursor_trail_size = 0.5
|
||||||
|
vim.g.neovide_cursor_smooth_blink = true
|
||||||
|
vim.cmd.set('guicursor=i-v-c:blinkwait400-blinkoff350-blinkon250,i-ci-ve:ver25,r-cr:hor20,o:hor20')
|
||||||
|
|
||||||
|
-- Pasting
|
||||||
|
vim.keymap.set('i', '<SC-v>', '<C-r>+')
|
||||||
|
vim.keymap.set('n', '<SC-v>', '"+p')
|
||||||
@@ -7,6 +7,8 @@ vim.opt.shiftwidth = 4
|
|||||||
-- Line numbers
|
-- Line numbers
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
vim.opt.cursorlineopt = 'number'
|
||||||
|
|
||||||
-- Folding
|
-- Folding
|
||||||
vim.opt.foldlevelstart = 99
|
vim.opt.foldlevelstart = 99
|
||||||
@@ -19,3 +21,20 @@ vim.g.terminal_emulator = 'kitty'
|
|||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
vim.lsp.inlay_hint.enable()
|
vim.lsp.inlay_hint.enable()
|
||||||
|
|
||||||
|
-- Splitting
|
||||||
|
-- vim.cmd.set('splitbelow')
|
||||||
|
-- vim.cmd.set('splitright')
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
|
-- Make text readable
|
||||||
|
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||||
|
pattern = { '*.md', '*.typ' },
|
||||||
|
command = 'setlocal linebreak',
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = 'help',
|
||||||
|
command = 'setlocal linebreak',
|
||||||
|
})
|
||||||
|
|||||||
53
.config/nvim/lua/BluePlum/utility.lua
Normal file
53
.config/nvim/lua/BluePlum/utility.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
function Ask(msg)
|
||||||
|
vim.cmd.echohl('Question')
|
||||||
|
vim.cmd.echo('"' .. msg .. '"')
|
||||||
|
vim.cmd.echohl()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Confirm(msg)
|
||||||
|
Ask(msg .. ' [Y/n] ')
|
||||||
|
|
||||||
|
local answer = vim.fn.getchar()
|
||||||
|
return answer ~= 110 and answer ~= 27 and answer ~= 37 -- 'n', <ESC>, <SPACE>
|
||||||
|
end
|
||||||
|
|
||||||
|
function Input(prompt, last)
|
||||||
|
local buffer = ''
|
||||||
|
while true do
|
||||||
|
vim.cmd('redraw | echo')
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ prompt, 'Question' },
|
||||||
|
last and { last, 'Visual' } or { buffer, 'Normal' },
|
||||||
|
}, false, {})
|
||||||
|
|
||||||
|
local character = vim.fn.getchar()
|
||||||
|
if pcall(function(char)
|
||||||
|
if vim.fn.keytrans(char) ~= '<BS>' then
|
||||||
|
error()
|
||||||
|
end
|
||||||
|
end, character) then
|
||||||
|
last = nil
|
||||||
|
buffer = vim.fn.slice(buffer, 0, -1)
|
||||||
|
elseif character == 27 then
|
||||||
|
vim.cmd('redraw | echo')
|
||||||
|
return nil
|
||||||
|
elseif character == 13 then
|
||||||
|
return last or buffer
|
||||||
|
elseif
|
||||||
|
(character == 32 or pcall(function(char)
|
||||||
|
if vim.fn.keytrans(char) ~= '<Right>' then
|
||||||
|
error()
|
||||||
|
end
|
||||||
|
end, character)) and last
|
||||||
|
then
|
||||||
|
buffer = last
|
||||||
|
if character == 32 then
|
||||||
|
buffer = buffer .. ' '
|
||||||
|
end
|
||||||
|
last = nil
|
||||||
|
else
|
||||||
|
last = nil
|
||||||
|
buffer = buffer .. vim.fn.nr2char(character)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -114,31 +114,13 @@ cmp.setup({
|
|||||||
|
|
||||||
return kind
|
return kind
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- format = function(entry, vim_item)
|
|
||||||
-- -- Kind icons
|
|
||||||
-- vim_item.kind = string.format('%s %s ', cmp_kind_icons[vim_item.kind], vim_item.kind)
|
|
||||||
--
|
|
||||||
-- return vim_item
|
|
||||||
-- end,
|
|
||||||
|
|
||||||
-- format = function(entry, item)
|
|
||||||
-- local menu_icon = {
|
|
||||||
-- nvim_lsp = 'λ',
|
|
||||||
-- luasnip = '⋗',
|
|
||||||
-- buffer = 'Ω',
|
|
||||||
-- path = '🖫',
|
|
||||||
-- }
|
|
||||||
|
|
||||||
-- item.menu = menu_icon[entry.source.name]
|
|
||||||
-- return item
|
|
||||||
-- end
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- #region Highlight groups
|
-- #region Highlight groups
|
||||||
|
|
||||||
-- Customization for Pmenu
|
-- Customization for Pmenu
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'PmenuSel', { bg = '#282C34', fg = 'NONE' })
|
vim.api.nvim_set_hl(0, 'PmenuSel', { bg = '#282C34', fg = 'NONE' })
|
||||||
vim.api.nvim_set_hl(0, 'Pmenu', { fg = '#C5CDD9', bg = '#22252A' })
|
vim.api.nvim_set_hl(0, 'Pmenu', { fg = '#C5CDD9', bg = '#22252A' })
|
||||||
|
|
||||||
@@ -151,9 +133,9 @@ vim.api.nvim_set_hl(0, 'CmpItemKindField', { fg = '#EED8DA', bg = '#B5585F' })
|
|||||||
vim.api.nvim_set_hl(0, 'CmpItemKindProperty', { fg = '#EED8DA', bg = '#B5585F' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindProperty', { fg = '#EED8DA', bg = '#B5585F' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindEvent', { fg = '#EED8DA', bg = '#B5585F' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindEvent', { fg = '#EED8DA', bg = '#B5585F' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindText', { fg = '#e2f3c9', bg = '#94c549' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindText', { fg = '#C3E88D', bg = '#9FBD73' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindEnum', { fg = '#e2f3c9', bg = '#94c549' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindEnum', { fg = '#C3E88D', bg = '#9FBD73' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindKeyword', { fg = '#e2f3c9', bg = '#94c549' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindKeyword', { fg = '#C3E88D', bg = '#9FBD73' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindConstant', { fg = '#FFE082', bg = '#D4BB6C' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindConstant', { fg = '#FFE082', bg = '#D4BB6C' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindConstructor', { fg = '#FFE082', bg = '#D4BB6C' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindConstructor', { fg = '#FFE082', bg = '#D4BB6C' })
|
||||||
@@ -168,9 +150,9 @@ vim.api.nvim_set_hl(0, 'CmpItemKindOperator', { fg = '#EADFF0', bg = '#A377BF' }
|
|||||||
vim.api.nvim_set_hl(0, 'CmpItemKindVariable', { fg = '#C5CDD9', bg = '#7E8294' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindVariable', { fg = '#C5CDD9', bg = '#7E8294' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindFile', { fg = '#C5CDD9', bg = '#7E8294' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindFile', { fg = '#C5CDD9', bg = '#7E8294' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindUnit', { fg = '#F5EBD9', bg = '#D29a32' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindUnit', { fg = '#F5EBD9', bg = '#D4A959' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindSnippet', { fg = '#F5EBD9', bg = '#D29a32' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindSnippet', { fg = '#F5EBD9', bg = '#D4A959' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindFolder', { fg = '#F5EBD9', bg = '#D29a32' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindFolder', { fg = '#F5EBD9', bg = '#D4A959' })
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindMethod', { fg = '#DDE5F5', bg = '#6C8ED4' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindMethod', { fg = '#DDE5F5', bg = '#6C8ED4' })
|
||||||
vim.api.nvim_set_hl(0, 'CmpItemKindValue', { fg = '#DDE5F5', bg = '#6C8ED4' })
|
vim.api.nvim_set_hl(0, 'CmpItemKindValue', { fg = '#DDE5F5', bg = '#6C8ED4' })
|
||||||
|
|||||||
23
.config/nvim/lua/plugins/comp-mode.lua
Normal file
23
.config/nvim/lua/plugins/comp-mode.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'ej-shafran/compile-mode.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'm00qek/baleia.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeInfo', { link = 'DiagnosticInfo' })
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeWarning', { link = 'DiagnosticWarning' })
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeError', { link = 'DiagnosticError' })
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeCommandOutput', { link = 'Statement' })
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeMessage', { link = 'SpellCap' })
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeMessageRow', { link = 'CursorLineNr' })
|
||||||
|
vim.api.nvim_set_hl(0, 'CompileModeMessageCol', { link = 'CursorLineNr' })
|
||||||
|
|
||||||
|
vim.g.compile_mode = {
|
||||||
|
baleria_setup = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'loctvl842/monokai-pro.nvim',
|
'blazkowolf/gruber-darker.nvim',
|
||||||
-- lazy = true,
|
|
||||||
priority = 999,
|
priority = 999,
|
||||||
config = function()
|
config = function()
|
||||||
require('monokai-pro').setup({
|
-- require('gruber-darker').setup()
|
||||||
filter = 'spectrum',
|
vim.cmd.colorscheme('gruber-darker')
|
||||||
})
|
|
||||||
vim.cmd.colorscheme('monokai-pro')
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
3
.zshrc
3
.zshrc
@@ -46,3 +46,6 @@ zinit ice wait'!0'
|
|||||||
|
|
||||||
# source ${ZINIT_HOME}/../plugins/marlonrichert---zsh-autocomplete/zsh-autocomplete.plugin.zsh
|
# source ${ZINIT_HOME}/../plugins/marlonrichert---zsh-autocomplete/zsh-autocomplete.plugin.zsh
|
||||||
# zstyle ':autocomplete:*' delay 0.1 # seconds (float)
|
# zstyle ':autocomplete:*' delay 0.1 # seconds (float)
|
||||||
|
|
||||||
|
# Created by `pipx` on 2024-08-28 16:28:46
|
||||||
|
export PATH="$PATH:/home/anton/.local/bin"
|
||||||
|
|||||||
@@ -16,3 +16,6 @@ alias ll='ls -l'
|
|||||||
# WG
|
# WG
|
||||||
alias wgon='wg-quick up ~/Downloads/wg0.conf'
|
alias wgon='wg-quick up ~/Downloads/wg0.conf'
|
||||||
alias wgoff='wg-quick down ~/Downloads/wg0.conf'
|
alias wgoff='wg-quick down ~/Downloads/wg0.conf'
|
||||||
|
|
||||||
|
# nvim
|
||||||
|
nv() { neovide $1 & }
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
setopt interactivecomments # VERY IMPORTANT LINE! Completions will be very bad without it
|
setopt interactivecomments # VERY IMPORTANT LINE! Completions will be very bad without it
|
||||||
|
|
||||||
zinit ice as"completion"
|
zstyle ':autocomplete:*' min-delay 0.5 # float
|
||||||
|
zstyle ':autocomplete:*' min-input 2 # int
|
||||||
|
zstyle ':autocomplete:*' insert-unambiguous no
|
||||||
|
|
||||||
|
zinit ice as "autocomplete"
|
||||||
zinit light zsh-users/zsh-completions
|
zinit light zsh-users/zsh-completions
|
||||||
|
|
||||||
zinit light marlonrichert/zsh-autocomplete
|
zinit light marlonrichert/zsh-autocomplete
|
||||||
|
|
||||||
|
|||||||
@@ -31,3 +31,22 @@ split() {
|
|||||||
(kitty . &)
|
(kitty . &)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
APPLETS=("svelte" "react" "vite")
|
||||||
|
|
||||||
|
declare -A KNOWN_APPLETS=(
|
||||||
|
["svelte"]="npm create svelte@latest"
|
||||||
|
["react"]="npx create-next-app@latest"
|
||||||
|
["vite"]="npm create vite@latest"
|
||||||
|
)
|
||||||
|
|
||||||
|
create() {
|
||||||
|
if [[ -n "$KNOWN_APPLETS[$1]" ]]; then
|
||||||
|
eval "$KNOWN_APPLETS[$1]"
|
||||||
|
else
|
||||||
|
echo "$fg[red]FATAL:$fg[white] I don't know that applet"
|
||||||
|
echo "USAGE: create <applet>"
|
||||||
|
echo "APPLETS:"
|
||||||
|
echo " $APPLETS"
|
||||||
|
return 64
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
27
zsh/git.sh
27
zsh/git.sh
@@ -1,27 +0,0 @@
|
|||||||
function git_prompt_info() {
|
|
||||||
# If we are on a folder not tracked by git, get out.
|
|
||||||
# Otherwise, check for hide-info at global and local repository level
|
|
||||||
if ! __git_prompt_git rev-parse --git-dir &> /dev/null \
|
|
||||||
|| [[ "$(__git_prompt_git config --get oh-my-zsh.hide-info 2>/dev/null)" == 1 ]]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get either:
|
|
||||||
# - the current branch name
|
|
||||||
# - the tag name if we are on a tag
|
|
||||||
# - the short SHA of the current commit
|
|
||||||
local ref
|
|
||||||
ref=$(__git_prompt_git symbolic-ref --short HEAD 2> /dev/null) \
|
|
||||||
|| ref=$(__git_prompt_git describe --tags --exact-match HEAD 2> /dev/null) \
|
|
||||||
|| ref=$(__git_prompt_git rev-parse --short HEAD 2> /dev/null) \
|
|
||||||
|| return 0
|
|
||||||
|
|
||||||
# Use global ZSH_THEME_GIT_SHOW_UPSTREAM=1 for including upstream remote info
|
|
||||||
local upstream
|
|
||||||
if (( ${+ZSH_THEME_GIT_SHOW_UPSTREAM} )); then
|
|
||||||
upstream=$(__git_prompt_git rev-parse --abbrev-ref --symbolic-full-name "@{upstream}" 2>/dev/null) \
|
|
||||||
&& upstream=" -> ${upstream}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "${ZSH_THEME_GIT_PROMPT_PREFIX}${ref:gs/%/%%}${upstream:gs/%/%%}$(parse_git_dirty)${ZSH_THEME_GIT_PROMPT_SUFFIX}"
|
|
||||||
}
|
|
||||||
@@ -13,5 +13,4 @@ zinit light zsh-users/zsh-syntax-highlighting
|
|||||||
zinit snippet OMZP::colored-man-pages
|
zinit snippet OMZP::colored-man-pages
|
||||||
zinit snippet OMZP::sudo
|
zinit snippet OMZP::sudo
|
||||||
zinit snippet OMZP::git
|
zinit snippet OMZP::git
|
||||||
zinit snippet OMZ::lib/git.zsh
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ update_prompt() {
|
|||||||
# PROMPT+="%{$fg[yellow]%}$(git remote show | head -n 1)"
|
# PROMPT+="%{$fg[yellow]%}$(git remote show | head -n 1)"
|
||||||
# PROMPT+="%{$fg_bold[magenta] $(git_repo_name)"
|
# PROMPT+="%{$fg_bold[magenta] $(git_repo_name)"
|
||||||
# PROMPT+="%{$fg_bold[blue]($(git_current_branch))%{$fg[white]%}:"
|
# PROMPT+="%{$fg_bold[blue]($(git_current_branch))%{$fg[white]%}:"
|
||||||
PROMPT+="%{$fg[yellow]%}$(git remote show | head -n 1) %{$fg_bold[magenta]%}$(git_repo_name)%{$fg_bold[blue]%}($(git_current_branch))%{$fg[white]%}:"
|
if [[ -n "$(git remote show)" ]]; then
|
||||||
|
PROMPT+="%{$fg[yellow]%}$(git remote show | head -n 1)"
|
||||||
|
else
|
||||||
|
PROMPT+="%{$fg_bold[red]%}NO-REMOTE"
|
||||||
|
fi
|
||||||
|
PROMPT+=" %{$fg_bold[magenta]%}$(git_repo_name)%{$fg_bold[blue]%}($(git_current_branch))%{$fg[white]%}:"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user