From 28ed341cd0d6b5a9c5d2770e0dfd99ce277af740 Mon Sep 17 00:00:00 2001 From: Seymur Bagirov Date: Tue, 11 Jun 2024 20:20:56 +0400 Subject: [PATCH] misc changes --- hypr/autostart.conf | 5 ++- hypr/devices.conf | 5 +++ kitty/kitty.conf | 2 +- nvim/lazy-lock.json | 60 +++++++++++++------------ nvim/lua/themystery/plugins/cord.lua | 27 ++++++----- nvim/lua/themystery/plugins/init.lua | 9 ++++ nvim/lua/themystery/plugins/lsp.lua | 44 +++++++++++++++++- nvim/lua/themystery/plugins/lualine.lua | 5 +-- nvim/lua/themystery/plugins/oil.lua | 30 +++++++++++++ nvim/lua/themystery/plugins/theme.lua | 28 +++++++----- nvim/lua/themystery/plugins/tree.lua | 1 + nvim/lua/themystery/plugins/trouble.lua | 2 +- zsh/.zshrc | 5 ++- 13 files changed, 164 insertions(+), 59 deletions(-) create mode 100644 hypr/devices.conf create mode 100644 nvim/lua/themystery/plugins/oil.lua diff --git a/hypr/autostart.conf b/hypr/autostart.conf index 0636a23..69d718b 100755 --- a/hypr/autostart.conf +++ b/hypr/autostart.conf @@ -1,6 +1,6 @@ exec-once=nm-applet --indicator & disown exec-once= /usr/libexec/kdeconnectd -exec-once= kdeconnect-indicator +exec-once= kdeconnectd & kdeconnect-indicator exec-once = /usr/libexec/polkit-kde-authentication-agent-1 exec-once = waybar exec-once = swaync # notification @@ -38,3 +38,6 @@ windowrulev2 = immediate, title:^(Overwatch)$ windowrulev2 = immediate, class:^(cs2)$ windowrulev2 = immediate, class:^(steam_app_1088710)$ windowrulev2 = immediate, title:^(The Escapists 2)$ + +# devices +source = ~/.config/hypr/devices.conf diff --git a/hypr/devices.conf b/hypr/devices.conf new file mode 100644 index 0000000..56b3bb8 --- /dev/null +++ b/hypr/devices.conf @@ -0,0 +1,5 @@ +# disable touchpad on dualsense controller +device { + name = dualsense-wireless-controller-touchpad + enabled = 0 +} diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 0afcd7c..0482ccb 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1084,7 +1084,7 @@ include ./OneDark.conf #: The foreground and background colors. -background_opacity 0.97 +# background_opacity 0.97 #: The opacity of the background. A number between zero and one, where #: one is opaque and zero is fully transparent. This will only work if diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index ef5efef..572a5e2 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,6 +1,6 @@ { "Ionide-vim": { "branch": "master", "commit": "00099c3cf53cba28a1d8084ab8d21639c62bd747" }, - "LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" }, + "LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, "cloak.nvim": { "branch": "main", "commit": "6e5bcd50bebc5cdb7cd3a00eb3d97ab7c4cc3b94" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -9,51 +9,53 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "codesnap.nvim": { "branch": "main", "commit": "a223fd882953e56ae1a8747fdc44b8d6a2ff7a9b" }, - "conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" }, - "copilot.vim": { "branch": "release", "commit": "25feddf8e3aa79f0573c8f43ddb13c44c530cfa5" }, - "cord.nvim": { "branch": "master", "commit": "c366ac0e7b3a8fb2b854a21fa53e279ba5e89403" }, + "conform.nvim": { "branch": "master", "commit": "5541c54cf2ab078a537838e1fb9d96ae47f71255" }, + "copilot.vim": { "branch": "release", "commit": "1dcaf72099b436b5832d6117d9cd7a4a098a8d77" }, + "cord.nvim": { "branch": "master", "commit": "cf0af0fc9b8e218afd8c4928ae2e711ce455181b" }, "csharpls-extended-lsp.nvim": { "branch": "master", "commit": "bde4aebe0dc74952188c2130c6831a1d8e4ce5c6" }, - "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, - "gitsigns.nvim": { "branch": "main", "commit": "cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e" }, + "friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" }, + "gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, - "image.nvim": { "branch": "master", "commit": "2a618c86d9f8fd9f7895d12b55ec2f31fd14fa05" }, + "image.nvim": { "branch": "master", "commit": "a2a0849e0b3dbed90f9283603cedb683bda5d4d1" }, "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, - "kitty-scrollback.nvim": { "branch": "main", "commit": "08960ad9a96ff6ea6269157dbd4a8a499f7a4311" }, - "lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" }, - "leap.nvim": { "branch": "main", "commit": "5d10692be460f9e8a42d34cf98a012e3e18b23bf" }, + "kitty-scrollback.nvim": { "branch": "main", "commit": "dc101d0a8356db9c7290dfbfa82c27ec35e3b55a" }, + "lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" }, + "leap.nvim": { "branch": "main", "commit": "0d15057cc47fa49f6609bf364f5ad3842f08c58c" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "16de3b18c5f7b6230d89b8e64ce9a4801b6f8d08" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, - "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, - "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "noice.nvim": { "branch": "main", "commit": "f119045f38792ad5311e5f9be7a879e4c1a95fe0" }, - "nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8db12610bcb7ce67013cfdfaba4dd47a23c6e851" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" }, + "neofusion.nvim": { "branch": "main", "commit": "3563eb3b9f9d0a9981852ab8b0d922ec7930a53f" }, + "noice.nvim": { "branch": "main", "commit": "e5cb20c6e14305d24025ecb77d7d4dd9d61f1a64" }, + "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, - "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, - "nvim-dap": { "branch": "master", "commit": "922ebc75c2fa9305e36402fbd8c984c8638770a0" }, - "nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lspconfig": { "branch": "master", "commit": "d70633830acf605ec03d9728698d9e7232442eb4" }, + "nvim-lspconfig": { "branch": "master", "commit": "92166b89ab4b3d60f24e58170cac53b7141fd032" }, "nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, - "nvim-treesitter": { "branch": "master", "commit": "aa02427dfeaead86fae038024ae7b29299f08b8c" }, - "nvim-ts-autotag": { "branch": "main", "commit": "8ae54b90e36ef1fc5267214b30c2cbff71525fe4" }, - "nvim-ufo": { "branch": "main", "commit": "65dda6360879f6ffe0278163b9192a573a0d2a08" }, - "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, - "onedarkpro.nvim": { "branch": "main", "commit": "13c3244b2520a832989d797d69436df7d27e20b9" }, + "nvim-treesitter": { "branch": "master", "commit": "c1e1e24b6433d4539bad9f5daa207df39633071b" }, + "nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, + "nvim-ufo": { "branch": "main", "commit": "aa2e676af592b4e99c105d80d6eafd1afc215d99" }, + "nvim-web-devicons": { "branch": "master", "commit": "b4b302d6ae229f67df7a87ef69fa79473fe788a9" }, + "oil-git-status.nvim": { "branch": "main", "commit": "a7ea816bac0cc3b8b4c3605e2f2b87960be60a05" }, + "oil.nvim": { "branch": "master", "commit": "e5312c3a801e7274fa14e6a56aa10a618fed80c3" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "promise-async": { "branch": "main", "commit": "93540c168c5ed2b030ec3e6c40ab8bbb85e36355" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "849803e0a687c6ef7c9a0d305bd4d441017b8abf" }, - "rustaceanvim": { "branch": "master", "commit": "e306c742bd7f7183e371cd91268b72d9db1bbae0" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "0f314613125fdd7c85faaee3c87051611d883253" }, + "rustaceanvim": { "branch": "master", "commit": "2fa45427c01ded4d3ecca72e357f8a60fd8e46d4" }, + "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" }, + "trouble.nvim": { "branch": "main", "commit": "806c50491078b66daf13c408042f2e74da46d0ff" }, "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, - "vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" }, + "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, "vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" }, "vim-dadbod-ui": { "branch": "master", "commit": "0dc68d9225a70d42f8645049482e090c1a8dce25" }, "vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" }, diff --git a/nvim/lua/themystery/plugins/cord.lua b/nvim/lua/themystery/plugins/cord.lua index 63b2dc4..e012ce7 100644 --- a/nvim/lua/themystery/plugins/cord.lua +++ b/nvim/lua/themystery/plugins/cord.lua @@ -5,19 +5,26 @@ return { config = function() require('cord').setup({ timer = { - enable = true, -- Enable automatically updating presence - interval = 1500, -- Interval between presence updates in milliseconds (min 500) - reset_on_idle = true, -- Reset start timestamp on idle - reset_on_change = false, -- Reset start timestamp on presence change + enable = true, -- Enable automatically updating presence + interval = 1500, -- Interval between presence updates in milliseconds (min 500) + reset_on_idle = true, -- Reset start timestamp on idle + reset_on_change = false, -- Reset start timestamp on presence change }, text = { - viewing = 'Viewing {}', -- Text to display when viewing a readonly file - editing = 'Editing {}', -- Text to display when editing a file - file_browser = 'Browsing files in {}', -- Text to display when browsing files (Empty string to disable) - plugin_manager = 'Managing plugins in {}', -- Text to display when managing plugins (Empty string to disable) - lsp_manager = 'Configuring LSP in {}', -- Text to display when managing LSP servers (Empty string to disable) + viewing = 'Viewing {}', -- Text to display when viewing a readonly file + editing = 'Editing {}', -- Text to display when editing a file + file_browser = 'Browsing files in {}', -- Text to display when browsing files (Empty string to disable) + plugin_manager = 'Managing plugins in {}', -- Text to display when managing plugins (Empty string to disable) + lsp_manager = 'Configuring LSP in {}', -- Text to display when managing LSP servers (Empty string to disable) workspace = '', - } + }, + display = { + show_time = true, -- Display start timestamp + show_repository = false, -- Display 'View repository' button linked to repository url, if any + show_cursor_position = false, -- Display line and column number of cursor's position + swap_fields = false, -- If enabled, workspace is displayed first + workspace_blacklist = {}, -- List of workspace names to hide + }, }) end } diff --git a/nvim/lua/themystery/plugins/init.lua b/nvim/lua/themystery/plugins/init.lua index 92984a3..9259656 100644 --- a/nvim/lua/themystery/plugins/init.lua +++ b/nvim/lua/themystery/plugins/init.lua @@ -62,5 +62,14 @@ return { { "L3MON4D3/LuaSnip", build = "make install_jsregexp" + }, + { + "roobert/tailwindcss-colorizer-cmp.nvim", + -- optionally, override the default options: + config = function() + require("tailwindcss-colorizer-cmp").setup({ + color_square_width = 2, + }) + end } } diff --git a/nvim/lua/themystery/plugins/lsp.lua b/nvim/lua/themystery/plugins/lsp.lua index 8ffe7f5..0e746d3 100644 --- a/nvim/lua/themystery/plugins/lsp.lua +++ b/nvim/lua/themystery/plugins/lsp.lua @@ -60,6 +60,23 @@ return { } } }) + + lsp.configure("tailwindcss", { + settings = { + }, + filetypes = { + "astro", + "handlebars", + "html", + "javascript", + "javascriptreact", + "svelte", + "typescript", + "typescriptreact", + "rust" + }, + init_options = { userLanguages = { rust = "html" } }, + }) -- -- lsp.configure("rust_analyzer", { -- settings = { @@ -76,19 +93,42 @@ return { local cmp = require('cmp') local cmp_action = lsp.cmp_action() - local cmp_format = lsp.cmp_format() require('luasnip.loaders.from_vscode').lazy_load() + local tailwindcss_colors = require('tailwindcss-colorizer-cmp') + + local cmp_formatter = function(entry, vim_item) + -- vim_item as processed by tailwindcss-colorizer-cmp + vim_item = tailwindcss_colors.formatter(entry, vim_item) + + -- change menu (name of source) + vim_item.menu = ({ + nvim_lsp = "[LSP]", + buffer = "[Buffer]", + path = "[Path]", + emoji = "[Emoji]", + luasnip = "[LuaSnip]", + vsnip = "[VSCode Snippet]", + calc = "[Calc]", + spell = "[Spell]", + })[entry.source.name] + return vim_item + end + vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } cmp.setup({ - formatting = cmp_format, + formatting = { + fields = { "abbr", "menu", "kind" }, + format = cmp_formatter, + }, preselect = 'item', completion = { completeopt = 'menu,menuone,noinsert' }, window = { + completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), }, sources = { diff --git a/nvim/lua/themystery/plugins/lualine.lua b/nvim/lua/themystery/plugins/lualine.lua index 90aabe6..dbfb0d6 100644 --- a/nvim/lua/themystery/plugins/lualine.lua +++ b/nvim/lua/themystery/plugins/lualine.lua @@ -36,7 +36,6 @@ return { -- Disable sections and component separators component_separators = '', section_separators = '', - theme = 'onedark_vivid', globalstatus = true }, sections = { @@ -80,7 +79,7 @@ return { function() return '▊' end, - color = { fg = colors.blue }, -- Sets highlighting of component + color = { fg = colors.blue }, -- Sets highlighting of component padding = { left = 0, right = 1 }, -- We don't need space before this } @@ -176,7 +175,7 @@ return { -- Add components to right sections ins_right { - 'o:encoding', -- option component same as &encoding in viml + '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' }, diff --git a/nvim/lua/themystery/plugins/oil.lua b/nvim/lua/themystery/plugins/oil.lua new file mode 100644 index 0000000..9930c5b --- /dev/null +++ b/nvim/lua/themystery/plugins/oil.lua @@ -0,0 +1,30 @@ +return { + { + 'stevearc/oil.nvim', + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("oil").setup({ + delete_to_trash = true, + view_options = { + show_hidden = true, + }, + win_options = { + signcolumn = "yes:2", + }, + }) + + vim.keymap.set("n", "tf", vim.cmd.Oil); + vim.keymap.set("n", "tt", require("oil").toggle_float); + end + }, + { + "refractalize/oil-git-status.nvim", + + dependencies = { + "stevearc/oil.nvim", + }, + + config = true, + }, +} diff --git a/nvim/lua/themystery/plugins/theme.lua b/nvim/lua/themystery/plugins/theme.lua index ccc9fc1..8cba563 100644 --- a/nvim/lua/themystery/plugins/theme.lua +++ b/nvim/lua/themystery/plugins/theme.lua @@ -1,14 +1,22 @@ +-- return { +-- "olimorris/onedarkpro.nvim", +-- dependencies = { "lukas-reineke/indent-blankline.nvim" }, +-- priority = 1000, +-- config = function() +-- require("onedarkpro").setup({ +-- options = { +-- transparency = true, +-- } +-- }) +-- +-- vim.cmd("colorscheme onedark_vivid") +-- end +-- } return { - "olimorris/onedarkpro.nvim", - dependencies = { "lukas-reineke/indent-blankline.nvim" }, + "diegoulloao/neofusion.nvim", priority = 1000, config = function() - require("onedarkpro").setup({ - options = { - transparency = true, - } - }) - - vim.cmd("colorscheme onedark_vivid") - end + vim.o.background = "dark" + vim.cmd([[ colorscheme neofusion ]]) + end, } diff --git a/nvim/lua/themystery/plugins/tree.lua b/nvim/lua/themystery/plugins/tree.lua index 4facace..6ac7670 100644 --- a/nvim/lua/themystery/plugins/tree.lua +++ b/nvim/lua/themystery/plugins/tree.lua @@ -1,6 +1,7 @@ return { "nvim-neo-tree/neo-tree.nvim", branch = "v3.x", + enabled = false, dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended diff --git a/nvim/lua/themystery/plugins/trouble.lua b/nvim/lua/themystery/plugins/trouble.lua index 2e224c5..dd3cde1 100644 --- a/nvim/lua/themystery/plugins/trouble.lua +++ b/nvim/lua/themystery/plugins/trouble.lua @@ -2,7 +2,7 @@ return { "folke/trouble.nvim", config = function() require("trouble").setup() - vim.keymap.set("n", "xq", "TroubleToggle", + vim.keymap.set("n", "xq", "Trouble diagnostics toggle focus=false", { silent = true, noremap = true } ) end diff --git a/zsh/.zshrc b/zsh/.zshrc index ff055be..1f59762 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -36,12 +36,13 @@ _dotnet_zsh_complete() _values = "${(ps:\n:)completions}" } -compdef _dotnet_zsh_complete dotnet # useful plugins +source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh + +compdef _dotnet_zsh_complete dotnet # aws cli completion for zsh autoload bashcompinit && bashcompinit