Skip to content

Commit

Permalink
chore: replace nvim-cmp-path with async cmp path
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-cpp committed Oct 28, 2024
1 parent 1d14b73 commit 3f84e66
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .config/alacritty/alacritty.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import = ["~/.config/alacritty/themes/default.toml"]
live_config_reload = true

[colors]
draw_bold_text_with_bright_colors = true
Expand Down Expand Up @@ -415,3 +413,7 @@ title = "Alacritty"
[window.class]
general = "Alacritty"
instance = "Alacritty"

[general]
live_config_reload = true
import = ["~/.config/alacritty/themes/default.toml"]
1 change: 0 additions & 1 deletion .config/alacritty/themes/default.toml

This file was deleted.

36 changes: 36 additions & 0 deletions .config/alacritty/themes/default.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# cyberdream theme for alacritty
[[colors.indexed_colors]]
color = "0xffbd5e"
index = 16

[[colors.indexed_colors]]
color = "0xff6e5e"
index = 17

[colors.bright]
black = "0x3c4048"
blue = "0x5ea1ff"
cyan = "0x5ef1ff"
green = "0x5eff6c"
magenta = "0xbd5eff"
red = "0xff6e5e"
white = "0xffffff"
yellow = "0xf1ff5e"

[colors.normal]
black = "0x16181a"
blue = "0x5ea1ff"
cyan = "0x5ef1ff"
green = "0x5eff6c"
magenta = "0xbd5eff"
red = "0xff6e5e"
white = "0xffffff"
yellow = "0xf1ff5e"

[colors.primary]
background = "0x16181a"
foreground = "0xffffff"

[colors.selection]
background = "0x3c4048"
foreground = "0xffffff"
3 changes: 2 additions & 1 deletion .config/nvim/lua/plugins/cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ return {
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
-- 'hrsh7th/cmp-path',
'https://codeberg.org/FelipeLema/cmp-async-path',
'hrsh7th/cmp-cmdline',
'lukas-reineke/cmp-rg',
-- 'lukas-reineke/cmp-under-comparator',
Expand Down
11 changes: 6 additions & 5 deletions .config/nvim/lua/plugins/config/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,20 @@ cmp.setup({
},
{
name = 'rg',
keyword_length = 4,
keyword_length = 3,
max_item_count = 10,
priority_weight = 50,
option = {
additional_arguments = '--smart-case --hidden',
set_filetype = true,
marker = ' ❰❰❰',
},
entry_filter = function(entry)
return not entry.exact
end,
-- entry_filter = function(entry)
-- return not entry.exact
-- end,
},
{ name = 'path', priority = 50 },
-- { name = 'path', priority = 50 },
{ name = 'async_path', priority = 50, option = { trailing_slash = false } },
{
name = 'look',
keyword_length = 4,
Expand Down
10 changes: 2 additions & 8 deletions .config/nvim/lua/plugins/config/fzf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,13 @@ local m_keys = {
}
-- calling `setup` is optional for customization
fzf.setup({
defaults = {
formatter = { 'path.filename_first', 2 },
},
defaults = { formatter = { 'path.filename_first', 2 } },
fzf_opts = {
['--layout'] = 'reverse',
['--info'] = 'inline-right',
-- ['--tiebreak'] = 'end',
},
winopts = {
preview = {
default = 'bat', -- override the default previewer?
},
},
winopts = { preview = { default = 'bat' } },
hls = {
normal = hl_validate 'TelescopeNormal',
border = hl_validate 'TelescopeBorder',
Expand Down
23 changes: 23 additions & 0 deletions .config/nvim/lua/plugins/config/nordic.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require('nordic').setup({
transparent = { bg = true },
-- Enable brighter float border.
bright_border = true,
on_highlight = function(highlights, palette)
highlights.QuickScopePrimary = {
fg = palette.yellow.bright,
bg = palette.gray0,
bold = true,
underline = true,
}
highlights.QuickScopeSecondary = {
fg = palette.orange.dim,
bg = palette.gray0,
bold = true,
underline = true,
}
highlights['@tag.attribute'] = {
fg = '#6cc3b7', -- #6dada4 |
}
end,
})
vim.cmd.colorscheme 'nordic'
5 changes: 5 additions & 0 deletions .config/nvim/lua/plugins/lsp/svelte.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ return {
plugin = { svelte = { defaultScriptLanguage = 'typescript' } },
},
},
capabilities = {
workspace = {
didChangeWatchedFiles = vim.fn.has 'nvim-0.10' == 0 and { dynamicRegistration = true },
},
},
},
},
},
Expand Down
9 changes: 8 additions & 1 deletion .config/nvim/lua/plugins/mini/files.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ return {
windows = { preview = true, width_preview = 45 },
})
require('lsp-file-operations').setup()

local map_split = function(buf_id, lhs, direction, close_on_file)
local rhs = function()
local new_target_window
local cur_target_window = require('mini.files').get_target_window()
local cur_target_window = require('mini.files').get_explorer_state().target_window
if cur_target_window ~= nil then
vim.api.nvim_win_call(cur_target_window, function()
vim.cmd('belowright ' .. direction .. ' split')
Expand All @@ -72,11 +73,17 @@ return {
desc = 'Open in split(gs) or vsplit(gv)',
callback = function(args)
local buf_id = args.data.buf_id

-- Tweak keys to your liking
map_split(buf_id, 'gs', 'horizontal', false)
map_split(buf_id, 'gv', 'vertical', false)
map_split(buf_id, 'gS', 'horizontal', true)
map_split(buf_id, 'gV', 'vertical', true)

map_split(buf_id, '<C-w>s', 'horizontal', false)
map_split(buf_id, '<C-w>v', 'vertical', false)
map_split(buf_id, '<C-w>S', 'horizontal', true)
map_split(buf_id, '<C-w>V', 'vertical', true)
end,
})
local events = {
Expand Down
10 changes: 9 additions & 1 deletion .config/nvim/lua/plugins/theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
'catppuccin/nvim',
name = 'catppuccin',
event = 'VimEnter',
enabled = true,
enabled = false,
config = function()
require 'plugins.config.catppuccin'
end,
Expand Down Expand Up @@ -47,4 +47,12 @@ return {
vim.cmd.colorscheme 'rose-pine'
end,
},
{
'AlexvZyl/nordic.nvim',
enabled = true,
event = 'VimEnter',
config = function()
require 'plugins.config.nordic'
end,
},
}
2 changes: 2 additions & 0 deletions .config/qtile/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def assign_app_group(client: WindowType) -> None:
"Thorium-browser",
"thorium-browser",
"vieb",
"io.github.ungoogled_software.ungoogled_chromium",
"Io.github.ungoogled_software.ungoogled_chromium",
]:
client.togroup("2", switch_group=True)
elif (wm_class[0] or wm_class[1]) in [
Expand Down

0 comments on commit 3f84e66

Please sign in to comment.