From 7de5c82bb5c2e9412acfd49e09d739563cd3d258 Mon Sep 17 00:00:00 2001 From: Omar Essaid Date: Tue, 5 Sep 2023 11:03:29 +0200 Subject: [PATCH] Some updates --- .config/ctop/config | 10 + .config/kitty/dark.conf | 24 ++ .config/kitty/fleet.conf | 39 +++ .config/kitty/kitty.conf | 6 +- .config/nvim/lazy-lock.json | 62 ++-- .config/nvim/lua/plugins/colorscheme.lua | 176 +++++------ .config/nvim/lua/plugins/lsp/init.lua | 274 ++++++++++++------ .config/nvim/lua/plugins/telescope.lua | 6 +- .config/starship.toml | 2 +- .config/termshark/termshark.toml | 2 + .config/yabai/yabairc | 14 +- .config/zsh-snap | 1 + .config/zsh-snap-plugins/fzf-tab | 1 + .config/zsh-snap-plugins/zsh-autosuggestions | 1 + .../zsh-history-substring-search | 1 + .../zsh-snap-plugins/zsh-syntax-highlighting | 1 + .gitconfig | 14 +- .tmux.conf | 5 +- .zshrc | 52 +++- 19 files changed, 475 insertions(+), 216 deletions(-) create mode 100644 .config/ctop/config create mode 100644 .config/kitty/dark.conf create mode 100644 .config/kitty/fleet.conf create mode 100644 .config/termshark/termshark.toml create mode 160000 .config/zsh-snap create mode 160000 .config/zsh-snap-plugins/fzf-tab create mode 160000 .config/zsh-snap-plugins/zsh-autosuggestions create mode 160000 .config/zsh-snap-plugins/zsh-history-substring-search create mode 160000 .config/zsh-snap-plugins/zsh-syntax-highlighting diff --git a/.config/ctop/config b/.config/ctop/config new file mode 100644 index 0000000..e726abc --- /dev/null +++ b/.config/ctop/config @@ -0,0 +1,10 @@ +[options] + columns = "status,name,id,cpu,mem,net,io,pids,uptime" + filterStr = "" + sortField = "state" + +[toggles] + allContainers = true + enableHeader = false + fullRowCursor = true + sortReversed = false diff --git a/.config/kitty/dark.conf b/.config/kitty/dark.conf new file mode 100644 index 0000000..947c57c --- /dev/null +++ b/.config/kitty/dark.conf @@ -0,0 +1,24 @@ +# Kitty Configuration for Neovim theme + +background #1E1F22 +foreground #BCBEC4 +selection_background #214283 +cursor #889AFF + +# Ansi colors +color0 #000000 +color1 #F0524F +color2 #5C962C +color3 #A68A0D +color4 #3993D4 +color5 #A771BF +color6 #00A3A3 +color7 #808080 +color8 #595959 +color9 #FF4050 +color10 #4FC414 +color11 #E5BF00 +color12 #1FB0FF +color13 #ED7EED +color14 #00E5E5 +color15 #FFFFFF diff --git a/.config/kitty/fleet.conf b/.config/kitty/fleet.conf new file mode 100644 index 0000000..6486178 --- /dev/null +++ b/.config/kitty/fleet.conf @@ -0,0 +1,39 @@ +# Kitty configuration + +# Background color of the terminal +background #181818 + +# Foreground color of the terminal, used for text and cursor +foreground #d6d6dd + +# Cursor color +cursor #7dbeff + +# Selection color +selection_foreground #d6d6dd +selection_background #1F3661 + +# Color definitions +color0 #1e1e1e +color1 #CC7C8A +color2 #afcb85 +color3 #e5c995 +color4 #52a7f6 +color5 #d898d8 +color6 #78d0bd +color7 #d6d6dd +color8 #535353 +color9 #F44747 +color10 #00AF99 +color11 #DEA407 +color12 #2197F3 +color13 #E44C7A +color14 #204474 +color15 #ffffff + +# Extended colors (These are optional) +color16 #a390f0 +color17 #7dbeff +color18 #6d6d6d +color19 #efb080 +color20 #5A9F81 diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 9bef70c..d59a0db 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -247,7 +247,7 @@ disable_ligatures cursor #: Scrollback {{{ -# scrollback_lines 2000 +scrollback_lines 10000 #: Number of lines of history to keep in memory for scrolling back. #: Memory is allocated on demand. Negative numbers are (effectively) @@ -2288,4 +2288,6 @@ hide_window_decorations titlebar-only #: }}} -include gruvbox_dark_hard.conf +# include gruvbox_dark_hard.conf +# include fleet.conf +include dark.conf diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 34c13df..e6bf411 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,46 +1,46 @@ { - "LuaSnip": { "branch": "master", "commit": "a6355b12a3b7da0aef71f02560e17ff480182b97" }, + "LuaSnip": { "branch": "master", "commit": "99a94cc35ec99bf06263d0346128e908a204575c" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "af88e700417c6449719fc77f6f3745f88e42d5da" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, - "diffview.nvim": { "branch": "main", "commit": "63720aa5a70ce4aa386be407d0e612cd9e63861a" }, - "dressing.nvim": { "branch": "master", "commit": "0e3e1eba147fee6e638ac1ac28f0495bcde17319" }, + "dark.nvim": { "branch": "main", "commit": "98888915bc1b0545416bc867eec97b92c6e7f344" }, + "diffview.nvim": { "branch": "main", "commit": "500d8b2013812e05ab87db83a8d22319986519f2" }, + "dressing.nvim": { "branch": "master", "commit": "c0b67f3e2950adc07b555d3e73e38275b4a585ce" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "8f26df063f0fdabc27845c7aed56db9102d385e8" }, - "gitsigns.nvim": { "branch": "main", "commit": "372d5cb485f2062ac74abc5b33054abac21d8b58" }, + "friendly-snippets": { "branch": "main", "commit": "bc38057e513458cb2486b6cd82d365fa294ee398" }, + "gitsigns.nvim": { "branch": "main", "commit": "bae45ef449d8811061cc940459e70e883a3aa83a" }, "gv.vim": { "branch": "master", "commit": "320cc8c477c5acc4fa0e52a460d87b2af54fa051" }, - "lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" }, - "lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, - "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "b81c50c4baae7d80b1723b3fa86e814d7754d15b" }, - "mason.nvim": { "branch": "main", "commit": "7caf4f7143b4b2e17fe0e893bdd05c622c508207" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "2b2f74828eeb02cf29d6b21aa32eedadadc94ca7" }, - "neodev.nvim": { "branch": "main", "commit": "864b35006d3de24c60e44b566de8018f919b13e6" }, - "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, - "null-ls.nvim": { "branch": "main", "commit": "f8ffcd7cb8fb3325c711d459152ef132b5b65aed" }, - "nvim-base16": { "branch": "master", "commit": "18ce3c5f694aaac31f5a434937ca6abe02b83f92" }, - "nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" }, + "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" }, + "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, + "mason.nvim": { "branch": "main", "commit": "74eac861b013786bf231b204b4ba9a7d380f4bd9" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, + "neodev.nvim": { "branch": "main", "commit": "461519d5a0023a73cb46d21392751d0731eacec8" }, + "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, + "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, + "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" }, - "nvim-lspconfig": { "branch": "master", "commit": "e52efca5d4f5536533d447ec0d97e4d525b37ace" }, - "nvim-navic": { "branch": "master", "commit": "27124a773d362628b114cd12016e743dab4ccf3e" }, - "nvim-notify": { "branch": "master", "commit": "50d037041ada0895aeba4c0215cde6d11b7729c4" }, - "nvim-treesitter": { "branch": "master", "commit": "f7e8b7420ccf8bc61534ea6155db03d62c7ff571" }, - "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, - "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "nvim-lspconfig": { "branch": "master", "commit": "7c73a4dc44c3d62ee79ab9f03ba313251c0388d4" }, + "nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" }, + "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, + "nvim-treesitter": { "branch": "master", "commit": "80cee52d445363c8bd08eacca17be31e3837f4d0" }, + "nvim-web-devicons": { "branch": "master", "commit": "eb8f80f30fd5e9a6176dee5c46661ebd7437ac46" }, + "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, "registers": { "branch": "main", "commit": "2ab8372bb837f05fae6b43091f10a0b725d113ca" }, - "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, + "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope-undo.nvim": { "branch": "main", "commit": "231b5ebb4328d2768c830c9a8d1b9c696116848d" }, - "telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" }, - "toggleterm.nvim": { "branch": "main", "commit": "026dff5e2b504941cf172691561a67ea362596aa" }, - "trouble.nvim": { "branch": "main", "commit": "2ae7237c2917d661f458443c9a88680f8ca2d7b2" }, - "vim-fugitive": { "branch": "master", "commit": "e6651a79facf5cc2b7c554fdc19eb8a9fe89602c" } + "telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" }, + "telescope.nvim": { "branch": "master", "commit": "dc192faceb2db64231ead71539761e055df66d73" }, + "toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" }, + "trouble.nvim": { "branch": "main", "commit": "40aad004f53ae1d1ba91bcc5c29d59f07c5f01d3" }, + "vim-fugitive": { "branch": "master", "commit": "b3b838d690f315a503ec4af8c634bdff3b200aaf" } } \ No newline at end of file diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua index 9e0e2e1..92a5953 100644 --- a/.config/nvim/lua/plugins/colorscheme.lua +++ b/.config/nvim/lua/plugins/colorscheme.lua @@ -1,89 +1,103 @@ return { -- colorscheme + -- { + -- 'RRethy/nvim-base16', + -- lazy = false, + -- priority = 1000, + -- config = function() + -- -- base00 = '#1d2021', base01 = '#3c3836', base02 = '#504945', base03 = '#665c54', + -- -- base04 = '#bdae93', base05 = '#d5c4a1', base06 = '#ebdbb2', base07 = '#fbf1c7', + -- -- base08 = '#fb4934', base09 = '#fe8019', base0A = '#fabd2f', base0B = '#b8bb26', + -- -- base0C = '#8ec07c', base0D = '#83a598', base0E = '#d3869b', base0F = '#d65d0e' + -- + -- local function custom_highlights() + -- local colors = require('base16-colorscheme').colors + -- -- General settings + -- vim.api.nvim_set_hl(0, 'Visual', { reverse = true }) + -- vim.api.nvim_set_hl(0, 'IncSearch', { fg = colors.base00, bg = colors.base0D }) + -- vim.api.nvim_set_hl(0, 'CursorLine', { fg = nil, bg = '#262727' }) + -- vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = colors.base03, bg = '#262727' }) + -- vim.api.nvim_set_hl(0, 'LineNr', { fg = colors.base03 }) + -- vim.api.nvim_set_hl(0, 'WinSeparator', { fg = colors.base03 }) + -- vim.api.nvim_set_hl(0, 'EndOfBuffer', { fg = colors.base00 }) + -- -- Floating windows + -- vim.api.nvim_set_hl(0, 'FloatBorder', { fg = colors.base03, bg = colors.base00 }) + -- vim.api.nvim_set_hl(0, 'NormalFloat', { bg = colors.base00 }) + -- -- Telescope: https://github.com/nvim-telescope/telescope.nvim/blob/master/plugin/telescope.lua + -- vim.api.nvim_set_hl(0, 'TelescopeBorder', { fg = colors.base03 }) + -- vim.api.nvim_set_hl(0, 'TelescopeSelection', { bg = '#262727' }) + -- vim.api.nvim_set_hl(0, 'TelescopePromptPrefix', { fg = colors.base0D }) + -- vim.api.nvim_set_hl(0, 'TelescopeMatching', { fg = colors.base0D }) + -- -- Cmp + -- vim.api.nvim_set_hl(0, 'CmpItemAbbr', { fg = colors.base05, bg = 'NONE' }) + -- vim.api.nvim_set_hl(0, 'CmpItemAbbrMatch', { fg = colors.base0D, bg = 'NONE', bold = true }) + -- vim.api.nvim_set_hl(0, 'CmpItemAbbrMatchFuzzy', { fg = colors.base0D, bg = 'NONE', bold = true }) + -- vim.api.nvim_set_hl(0, 'CmpItemAbbrDeprecated', { fg = colors.base02, bg = 'NONE', strikethrough = true }) + -- vim.api.nvim_set_hl(0, 'CmpItemMenu', { fg = colors.base0D, bg = 'NONE', italic = true }) + -- -- Command menu + -- vim.api.nvim_set_hl(0, 'Pmenu', { fg = colors.base05, bg = '#262727' }) + -- vim.api.nvim_set_hl(0, 'PmenuSel', { fg = colors.base00, bg = colors.base0D }) + -- -- Rust + -- vim.api.nvim_set_hl(0, 'rustReservedKeyword', { fg = colors.base08, bg = 'NONE', bold = true, italic = true }) + -- vim.api.nvim_set_hl(0, 'rustInvalidBareKeyword', { fg = colors.base08, bg = 'NONE', bold = true, italic = true }) + -- + -- local links = { + -- ['@lsp.type.namespace'] = '@namespace', + -- ['@lsp.type.type'] = '@type', + -- ['@lsp.type.class'] = '@type', + -- ['@lsp.type.enum'] = '@type', + -- ['@lsp.type.interface'] = '@type', + -- ['@lsp.type.struct'] = '@structure', + -- ['@lsp.type.parameter'] = '@parameter', + -- ['@lsp.type.property'] = '@property', + -- ['@lsp.type.enumMember'] = '@constant', + -- ['@lsp.type.function'] = '@function', + -- ['@lsp.type.method'] = '@method', + -- ['@lsp.type.macro'] = '@macro', + -- ['@lsp.type.decorator'] = '@function', + -- -- use treesitter styles + -- ['@lsp.type.comment.rust'] = '', + -- ['@lsp.type.variable'] = '', + -- } + -- for newgroup, oldgroup in pairs(links) do + -- vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) + -- end + -- end + -- + -- vim.api.nvim_create_autocmd('ColorScheme', { + -- pattern = '*', + -- callback = custom_highlights, + -- }) + -- + -- require('base16-colorscheme').with_config({ + -- telescope = false, + -- indentblankline = false, + -- notify = false, + -- ts_rainbow = false, + -- cmp = true, + -- illuminate = false, + -- lsp_semantic = true, + -- }) + -- -- vim.cmd("colorscheme base16-gruvbox-dark-hard") + -- -- vim.cmd("colorscheme base16-gruvbox-light-soft") + -- -- vim.cmd("colorscheme base16-gruvbox-dark-medium") + -- -- vim.cmd("colorscheme base16-gruvbox-material-dark-hard") + -- end, + -- }, + -- { + -- 'felipeagc/fleet-theme-nvim', + -- lazy = false, + -- priority = 1000, + -- config = function() + -- vim.cmd('colorscheme fleet') + -- end, + -- }, { - "RRethy/nvim-base16", + 'doums/dark.nvim', lazy = false, priority = 1000, config = function() - -- base00 = '#1d2021', base01 = '#3c3836', base02 = '#504945', base03 = '#665c54', - -- base04 = '#bdae93', base05 = '#d5c4a1', base06 = '#ebdbb2', base07 = '#fbf1c7', - -- base08 = '#fb4934', base09 = '#fe8019', base0A = '#fabd2f', base0B = '#b8bb26', - -- base0C = '#8ec07c', base0D = '#83a598', base0E = '#d3869b', base0F = '#d65d0e' - - local function custom_highlights() - local colors = require('base16-colorscheme').colors - -- General settings - vim.api.nvim_set_hl(0, "Visual", { reverse = true }) - vim.api.nvim_set_hl(0, "IncSearch", { fg = colors.base00, bg = colors.base0D }) - vim.api.nvim_set_hl(0, "CursorLine", { fg = nil, bg = "#262727" }) - vim.api.nvim_set_hl(0, "CursorLineNr", { fg = colors.base03, bg = "#262727" }) - vim.api.nvim_set_hl(0, "LineNr", { fg = colors.base03 }) - vim.api.nvim_set_hl(0, "WinSeparator", { fg = colors.base03 }) - vim.api.nvim_set_hl(0, "EndOfBuffer", { fg = colors.base00 }) - -- Floating windows - vim.api.nvim_set_hl(0, "FloatBorder", { fg = colors.base03, bg = colors.base00 }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = colors.base00 }) - -- Telescope: https://github.com/nvim-telescope/telescope.nvim/blob/master/plugin/telescope.lua - vim.api.nvim_set_hl(0, "TelescopeBorder", { fg = colors.base03 }) - vim.api.nvim_set_hl(0, "TelescopeSelection", { bg = "#262727" }) - vim.api.nvim_set_hl(0, "TelescopePromptPrefix", { fg = colors.base0D }) - vim.api.nvim_set_hl(0, "TelescopeMatching", { fg = colors.base0D }) - -- Cmp - vim.api.nvim_set_hl(0, "CmpItemAbbr", { fg = colors.base05, bg = "NONE" }) - vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = colors.base0D, bg = "NONE", bold = true }) - vim.api.nvim_set_hl(0, "CmpItemAbbrMatchFuzzy", { fg = colors.base0D, bg = "NONE", bold = true }) - vim.api.nvim_set_hl(0, "CmpItemAbbrDeprecated", { fg = colors.base02, bg = "NONE", strikethrough = true }) - vim.api.nvim_set_hl(0, "CmpItemMenu", { fg = colors.base0D, bg = "NONE", italic = true }) - -- Command menu - vim.api.nvim_set_hl(0, "Pmenu", { fg = colors.base05, bg = "#262727" }) - vim.api.nvim_set_hl(0, "PmenuSel", { fg = colors.base00, bg = colors.base0D }) - -- Rust - vim.api.nvim_set_hl(0, "rustReservedKeyword", - { fg = colors.base08, bg = "NONE", bold = true, italic = true }) - vim.api.nvim_set_hl(0, "rustInvalidBareKeyword", - { fg = colors.base08, bg = "NONE", bold = true, italic = true }) - - local links = { - ['@lsp.type.namespace'] = '@namespace', - ['@lsp.type.type'] = '@type', - ['@lsp.type.class'] = '@type', - ['@lsp.type.enum'] = '@type', - ['@lsp.type.interface'] = '@type', - ['@lsp.type.struct'] = '@structure', - ['@lsp.type.parameter'] = '@parameter', - ['@lsp.type.property'] = '@property', - ['@lsp.type.enumMember'] = '@constant', - ['@lsp.type.function'] = '@function', - ['@lsp.type.method'] = '@method', - ['@lsp.type.macro'] = '@macro', - ['@lsp.type.decorator'] = '@function', - -- use treesitter styles - ['@lsp.type.comment.rust'] = '', - ['@lsp.type.variable'] = '', - } - for newgroup, oldgroup in pairs(links) do - vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true }) - end - end - - vim.api.nvim_create_autocmd("ColorScheme", { - pattern = "*", - callback = custom_highlights - }) - - require('base16-colorscheme').with_config({ - telescope = false, - indentblankline = false, - notify = false, - ts_rainbow = false, - cmp = true, - illuminate = false, - lsp_semantic = true, - }) - vim.cmd("colorscheme base16-gruvbox-dark-hard") - -- vim.cmd("colorscheme base16-gruvbox-dark-medium") - -- vim.cmd("colorscheme base16-gruvbox-material-dark-hard") - end + vim.cmd('colorscheme dark') + end, }, - } diff --git a/.config/nvim/lua/plugins/lsp/init.lua b/.config/nvim/lua/plugins/lsp/init.lua index 4898fea..6b0b8c1 100644 --- a/.config/nvim/lua/plugins/lsp/init.lua +++ b/.config/nvim/lua/plugins/lsp/init.lua @@ -2,34 +2,36 @@ return { -- LSP support { 'neovim/nvim-lspconfig', - event = { "BufReadPost", "BufNewFile" }, + event = { 'BufReadPost', 'BufNewFile' }, dependencies = { { 'nvim-telescope/telescope.nvim' }, - { "folke/neodev.nvim" }, + { 'folke/neodev.nvim' }, { 'williamboman/mason.nvim' }, { 'williamboman/mason-lspconfig.nvim' }, - { "jose-elias-alvarez/null-ls.nvim" }, + { 'jose-elias-alvarez/null-ls.nvim' }, -- Rust - { "simrat39/rust-tools.nvim" }, + { 'simrat39/rust-tools.nvim' }, { 'saecki/crates.nvim', tag = 'v0.3.0', dependencies = { 'nvim-lua/plenary.nvim' }, }, - { "hrsh7th/nvim-cmp" }, - { "j-hui/fidget.nvim" }, - { "SmiteshP/nvim-navic" }, + { 'hrsh7th/nvim-cmp' }, + { 'j-hui/fidget.nvim', tag = 'legacy' }, + { 'SmiteshP/nvim-navic' }, - { "folke/trouble.nvim" }, - { "stevearc/dressing.nvim" }, + { 'folke/trouble.nvim' }, + { 'stevearc/dressing.nvim' }, { 'simrat39/symbols-outline.nvim' }, + + -- { 'p00f/clangd_extensions.nvim' } }, config = function() - require("fidget").setup {} + require('fidget').setup({}) - local navic = require("nvim-navic") - navic.setup { + local navic = require('nvim-navic') + navic.setup({ icons = { File = ' ', Module = ' ', @@ -56,35 +58,31 @@ return { Struct = ' ', Event = ' ', Operator = ' ', - TypeParameter = ' ' + TypeParameter = ' ', }, lsp = { - auto_attach = true - } - } + auto_attach = true, + }, + }) - require("mason").setup() + require('mason').setup() - require("mason-lspconfig").setup({ + require('mason-lspconfig').setup({ ensure_installed = { - "rust_analyzer", - "lua_ls", - "clangd", - "cmake", - "dockerls", - "pyright", + 'rust_analyzer', + 'lua_ls', + 'clangd', + 'cmake', + 'dockerls', + 'pyright', }, }) - vim.lsp.handlers["textDocument/hover"] = - vim.lsp.with( - vim.lsp.handlers.hover, - { - border = "rounded" - } - ) + vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { + border = 'rounded', + }) - local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) + local augroup = vim.api.nvim_create_augroup('LspFormatting', {}) local lsp_attach = function(client, bufnr) -- Location in file @@ -93,9 +91,9 @@ return { end -- Format on save - if client.supports_method("textDocument/formatting") then + if client.supports_method('textDocument/formatting') then vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) - vim.api.nvim_create_autocmd("BufWritePre", { + vim.api.nvim_create_autocmd('BufWritePre', { group = augroup, buffer = bufnr, callback = function() @@ -110,28 +108,47 @@ return { end local opts = { noremap = true, silent = true } - buf_set_keymap("n", "?", + buf_set_keymap( + 'n', + '?', " lua vim.diagnostic.open_float(nil, {focusable=false, source='always', border='rounded'})", - opts) - buf_set_keymap("n", "ss", ":SymbolsOutline", opts) + opts + ) + buf_set_keymap('n', 'ss', ':SymbolsOutline', opts) + buf_set_keymap('n', 'sh', ':ClangdSwitchSourceHeader', opts) - buf_set_keymap("n", "sa", " lua vim.lsp.buf.code_action()", opts) + buf_set_keymap('n', 'sa', ' lua vim.lsp.buf.code_action()', opts) - buf_set_keymap("n", "sd", + buf_set_keymap( + 'n', + 'sd', "lua require('telescope.builtin').lsp_definitions(require('telescope.themes').get_cursor({}))", - opts) - buf_set_keymap("n", "si", + opts + ) + buf_set_keymap( + 'n', + 'si', "lua require('telescope.builtin').lsp_implementations(require('telescope.themes').get_cursor({}))", - opts) - buf_set_keymap("n", "st", + opts + ) + buf_set_keymap( + 'n', + 'st', "lua require('telescope.builtin').lsp_type_definitions(require('telescope.themes').get_cursor({}))", - opts) - buf_set_keymap("n", "sr", + opts + ) + buf_set_keymap( + 'n', + 'sr', "lua require('telescope.builtin').lsp_references(require('telescope.themes').get_cursor({}))", - opts) - buf_set_keymap("n", "se", + opts + ) + buf_set_keymap( + 'n', + 'se', "lua require('telescope.builtin').diagnostics(require('telescope.themes').get_ivy({}))", - opts) + opts + ) -- buf_set_keymap("n", "so", -- "lua require('telescope.builtin').lsp_outgoing_calls(require('telescope.themes').get_cursor({}))", -- opts) @@ -139,14 +156,14 @@ return { -- "lua require('telescope.builtin').lsp_incoming_calls(require('telescope.themes').get_cursor({}))", -- opts) - buf_set_keymap("n", "sn", "lua vim.lsp.buf.rename()", opts) - buf_set_keymap("n", "s?", ":TroubleToggle document_diagnostics", opts) - buf_set_keymap("n", "sj", "lua vim.diagnostic.goto_next()", opts) - buf_set_keymap("n", "sk", "lua vim.diagnostic.goto_prev()", opts) + buf_set_keymap('n', 'sn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 's?', ':TroubleToggle document_diagnostics', opts) + buf_set_keymap('n', 'sj', 'lua vim.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'sk', 'lua vim.diagnostic.goto_prev()', opts) end - require("neodev").setup() - local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities() + require('neodev').setup() + local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities() -- Documentation in toml specification (Rust crates) local function show_documentation() @@ -162,38 +179,39 @@ return { end end - vim.keymap.set("n", "", show_documentation, { noremap = true, silent = true }) + vim.keymap.set('n', '', show_documentation, { noremap = true, silent = true }) - local null_ls = require("null-ls") + local null_ls = require('null-ls') null_ls.setup({ on_attach = lsp_attach, capabilities = lsp_capabilities, sources = { + null_ls.builtins.formatting.black, null_ls.builtins.formatting.buf, null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.shfmt, null_ls.builtins.formatting.taplo, null_ls.builtins.formatting.prettier.with({ - command = "prettier", + command = 'prettier', }), null_ls.builtins.diagnostics.eslint, }, }) - require("lspconfig").clangd.setup({ + require('lspconfig').clangd.setup({ on_attach = lsp_attach, capabilities = lsp_capabilities, cmd = { - "clangd", - "--background-index", - "--suggest-missing-includes", + 'clangd', + '--background-index', + '--suggest-missing-includes', -- -- by default, clang-tidy use -checks=clang-diagnostic-*,clang-analyzer-* -- -- to add more checks, create .clang-tidy file in the root directory -- -- and add Checks key, see https://clang.llvm.org/extra/clang-tidy/ - "--clang-tidy", - "--completion-style=bundled", - "--cross-file-rename", - "--header-insertion=iwyu", + '--clang-tidy', + '--completion-style=bundled', + '--cross-file-rename', + '--header-insertion=iwyu', }, init_options = { clangdFileStatus = true, -- Provides information about activity on clangd’s per-file worker thread @@ -201,28 +219,118 @@ return { completeUnimported = true, semanticHighlighting = true, }, - filetypes = { "c", "cpp" }, - single_file_support = true, + filetypes = { 'c', 'cpp' }, + -- single_file_support = true, }) + -- require("clangd_extensions").setup { + -- server = { + -- -- options to pass to nvim-lspconfig + -- -- i.e. the arguments to require("lspconfig").clangd.setup({}) + -- }, + -- extensions = { + -- -- defaults: + -- -- Automatically set inlay hints (type hints) + -- autoSetHints = true, + -- -- These apply to the default ClangdSetInlayHints command + -- inlay_hints = { + -- inline = vim.fn.has("nvim-0.10") == 1, + -- -- Options other than `highlight' and `priority' only work + -- -- if `inline' is disabled + -- -- Only show inlay hints for the current line + -- only_current_line = false, + -- -- Event which triggers a refersh of the inlay hints. + -- -- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but + -- -- not that this may cause higher CPU usage. + -- -- This option is only respected when only_current_line and + -- -- autoSetHints both are true. + -- only_current_line_autocmd = "CursorHold", + -- -- whether to show parameter hints with the inlay hints or not + -- show_parameter_hints = true, + -- -- prefix for parameter hints + -- parameter_hints_prefix = "<- ", + -- -- prefix for all the other hints (type, chaining) + -- other_hints_prefix = "=> ", + -- -- whether to align to the length of the longest line in the file + -- max_len_align = false, + -- -- padding from the left if max_len_align is true + -- max_len_align_padding = 1, + -- -- whether to align to the extreme right or not + -- right_align = false, + -- -- padding from the right if right_align is true + -- right_align_padding = 7, + -- -- The color of the hints + -- highlight = "Comment", + -- -- The highlight group priority for extmark + -- priority = 100, + -- }, + -- ast = { + -- -- These are unicode, should be available in any font + -- -- role_icons = { + -- -- type = "🄣", + -- -- declaration = "🄓", + -- -- expression = "🄔", + -- -- statement = ";", + -- -- specifier = "🄢", + -- -- ["template argument"] = "🆃", + -- -- }, + -- -- kind_icons = { + -- -- Compound = "🄲", + -- -- Recovery = "🅁", + -- -- TranslationUnit = "🅄", + -- -- PackExpansion = "🄿", + -- -- TemplateTypeParm = "🅃", + -- -- TemplateTemplateParm = "🅃", + -- -- TemplateParamObject = "🅃", + -- -- }, + -- role_icons = { + -- type = "", + -- declaration = "", + -- expression = "", + -- specifier = "", + -- statement = "", + -- ["template argument"] = "", + -- }, + -- kind_icons = { + -- Compound = "", + -- Recovery = "", + -- TranslationUnit = "", + -- PackExpansion = "", + -- TemplateTypeParm = "", + -- TemplateTemplateParm = "", + -- TemplateParamObject = "", + -- }, + -- highlights = { + -- detail = "Comment", + -- }, + -- }, + -- memory_usage = { + -- border = "none", + -- }, + -- symbol_info = { + -- border = "none", + -- }, + -- }, + -- } + require('lspconfig').pyright.setup({ on_attach = lsp_attach, capabilities = lsp_capabilities, }) - require("lspconfig").lua_ls.setup({ + require('lspconfig').lua_ls.setup({ on_attach = lsp_attach, capabilities = lsp_capabilities, settings = { Lua = { runtime = { - version = "LuaJIT", + version = 'LuaJIT', }, diagnostics = { - globals = { "vim" }, + globals = { 'vim' }, }, workspace = { - library = vim.api.nvim_get_runtime_file("", true), + library = vim.api.nvim_get_runtime_file('', true), }, telemetry = { enable = false, @@ -231,7 +339,7 @@ return { }, }) - require("rust-tools").setup({ + require('rust-tools').setup({ tools = { runnables = { use_telescope = true, @@ -240,8 +348,8 @@ return { auto = true, only_current_line = false, show_parameter_hints = true, - parameter_hints_prefix = " ", - other_hints_prefix = "→ ", + parameter_hints_prefix = ' ', + other_hints_prefix = '→ ', max_len_align = false, -- max_len_align_padding = 1, right_align = false, @@ -249,32 +357,32 @@ return { }, }, server = { - cmd = { "rust-analyzer" }, + cmd = { 'rust-analyzer' }, on_attach = lsp_attach, capabilities = lsp_capabilities, settings = { - ["rust-analyzer"] = { + ['rust-analyzer'] = { -- enable clippy on save checkOnSave = { - command = "clippy", + command = 'clippy', }, cargo = { - allFeatures = true - } + allFeatures = true, + }, }, }, }, }) - require("crates").setup({ + require('crates').setup({ null_ls = { enabled = false, - name = "crates", + name = 'crates', }, popup = { show_version_date = true, - } + }, }) - end + end, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 77c2ee5..fabc243 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -2,7 +2,7 @@ return { -- Telescope { 'nvim-telescope/telescope.nvim', - tag = '0.1.1', + -- tag = '0.1.1', dependencies = { 'nvim-lua/plenary.nvim', { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, @@ -82,7 +82,9 @@ return { horizontal = { mirror = false }, vertical = { mirror = false }, }, - file_ignore_patterns = { ".git/", ".meta" }, + file_ignore_patterns = { ".git/", + --".meta" + }, winblend = 1, border = true, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, diff --git a/.config/starship.toml b/.config/starship.toml index 8455193..ec63894 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -12,7 +12,7 @@ $all\ """ [directory] -style = "fg:16 bg:blue" +style = "fg:black bg:blue" repo_root_style = "fg:235 bold bg:blue" before_repo_root_style = "fg:bright-blue bg:blue" truncate_to_repo = false diff --git a/.config/termshark/termshark.toml b/.config/termshark/termshark.toml new file mode 100644 index 0000000..c913f63 --- /dev/null +++ b/.config/termshark/termshark.toml @@ -0,0 +1,2 @@ +[main] +dark-mode = true diff --git a/.config/yabai/yabairc b/.config/yabai/yabairc index bc8111c..109be38 100755 --- a/.config/yabai/yabairc +++ b/.config/yabai/yabairc @@ -2,7 +2,9 @@ # bar settings yabai -m config status_bar off -yabai -m config external_bar all:0:12 +# yabai -m config external_bar all:0:12 +# SPACEBAR_HEIGHT=$(spacebar -m config height) +# yabai -m config external_bar all:$SPACEBAR_HEIGHT:0 # global settings yabai -m config mouse_follows_focus off @@ -36,11 +38,11 @@ yabai -m config window_topmost off # general space settings yabai -m config layout bsp yabai -m config window_placement second_child -yabai -m config top_padding 10 -yabai -m config bottom_padding 10 -yabai -m config left_padding 10 -yabai -m config right_padding 10 -yabai -m config window_gap 10 +# yabai -m config top_padding $SPACEBAR_HEIGHT +# yabai -m config bottom_padding 10 +# yabai -m config left_padding 10 +# yabai -m config right_padding 10 +# yabai -m config window_gap 10 # Float Windows yabai -m rule --add app=Finder manage=off diff --git a/.config/zsh-snap b/.config/zsh-snap new file mode 160000 index 0000000..9b8edd8 --- /dev/null +++ b/.config/zsh-snap @@ -0,0 +1 @@ +Subproject commit 9b8edd89c2b2303ffa253c5116a97d9138e0831d diff --git a/.config/zsh-snap-plugins/fzf-tab b/.config/zsh-snap-plugins/fzf-tab new file mode 160000 index 0000000..69024c2 --- /dev/null +++ b/.config/zsh-snap-plugins/fzf-tab @@ -0,0 +1 @@ +Subproject commit 69024c27738138d6767ea7246841fdfc6ce0d0eb diff --git a/.config/zsh-snap-plugins/zsh-autosuggestions b/.config/zsh-snap-plugins/zsh-autosuggestions new file mode 160000 index 0000000..a411ef3 --- /dev/null +++ b/.config/zsh-snap-plugins/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8 diff --git a/.config/zsh-snap-plugins/zsh-history-substring-search b/.config/zsh-snap-plugins/zsh-history-substring-search new file mode 160000 index 0000000..400e58a --- /dev/null +++ b/.config/zsh-snap-plugins/zsh-history-substring-search @@ -0,0 +1 @@ +Subproject commit 400e58a87f72ecec14f783fbd29bc6be4ff1641c diff --git a/.config/zsh-snap-plugins/zsh-syntax-highlighting b/.config/zsh-snap-plugins/zsh-syntax-highlighting new file mode 160000 index 0000000..754cefe --- /dev/null +++ b/.config/zsh-snap-plugins/zsh-syntax-highlighting @@ -0,0 +1 @@ +Subproject commit 754cefe0181a7acd42fdcb357a67d0217291ac47 diff --git a/.gitconfig b/.gitconfig index e7622a6..55a48ed 100644 --- a/.gitconfig +++ b/.gitconfig @@ -20,7 +20,7 @@ fa = fetch --all --prune pa = pull --all ba = branch -v --all - info = !"onefetch --show-logo=never" + info = !"onefetch --no-art" [core] pager = delta @@ -52,14 +52,14 @@ [init] defaultBranch = main -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true - [submodule] recurse = true [url "git@gitlab.helsing-dev.ai:"] insteadof = https://gitlab.helsing-dev.ai/ + +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/.tmux.conf b/.tmux.conf index fc9ee19..4db3e84 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -22,7 +22,7 @@ unbind C-Space bind C-Space send-prefix # # increase scrollback buffer size -# set -g history-limit 5000 +set -g history-limit 50000 # # refresh 'status-left' and 'status-right' more often set -g status-interval 1 @@ -117,7 +117,8 @@ set -g status-left " #[fg=$THEME][#S] #{prefix_highlight} " set -g status-right-length 120 set -g status-left-length 100 -set -g window-status-current-format "#[fg=$THEME]#[fg=$THEME_HIGHLIGHTED_NUMBER]#[bg=$THEME]#I #[bg=$THEME_BG]#[fg=$THEME_HIGHLIGHTED_TEXT] #W#[fg=$THEME_BG]#[bg=$BACKGROUND] " +# set -g window-status-current-format "#[fg=$THEME]#[fg=$THEME_HIGHLIGHTED_NUMBER]#[bg=$THEME]#I #[bg=$THEME_BG]#[fg=$THEME_HIGHLIGHTED_TEXT] #W#[fg=$THEME_BG]#[bg=$BACKGROUND] " +set -g window-status-current-format "#[fg=$THEME]#[fg=$THEME_HIGHLIGHTED_NUMBER]#[bg=$THEME]#I #[bg=$THEME_BG]#[fg=$THEME_HIGHLIGHTED_TEXT] #{?window_zoomed_flag,#[fg=$THEME_TEXT][[,}#W#{?window_zoomed_flag,#[fg=$THEME_TEXT]]],}#[fg=$THEME_BG]#[bg=$BACKGROUND] " set -g window-status-format "#[fg=$THEME_BG]#[fg=$THEME_NUMBERS]#[bg=$THEME_BG]#I #[bg=$THEME_BG]#[fg=$THEME_TEXT] #W#[fg=$THEME_BG]#[bg=$BACKGROUND] " set -g pane-border-style fg=brightblack diff --git a/.zshrc b/.zshrc index 85c7c12..fdcb923 100644 --- a/.zshrc +++ b/.zshrc @@ -91,7 +91,7 @@ alias dots='/usr/bin/git --git-dir=$HOME/.dots/ --work-tree=$HOME' alias zshconfig="nvim ~/.zshrc" alias vim="nvim" alias vi="nvim" -alias ls="exa --color=always --octal-permissions --git --group-directories-first --classify --long" +# alias ls="exa --color=always --octal-permissions --git --group-directories-first --classify --long" alias la="exa -a --color=always --octal-permissions --git --group-directories-first --classify --long" alias ll="exa -a --color=always --octal-permissions --git --group-directories-first --classify --long" alias ee="ranger" @@ -147,3 +147,53 @@ case ":$PATH:" in *) export PATH="$PNPM_HOME:$PATH" ;; esac # pnpm end + +# Poetry +# export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring + +export PATH="/opt/homebrew/opt/llvm/bin:$PATH" +# GStreamer +# +# With official binaries +# export PATH=/Library/Frameworks/GStreamer.framework/Commands:$PATH +# export PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/bin${PATH:+:$PATH} +# export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Libraries/pkgconfig/ +# +# With homebrew install +export PKG_CONFIG_PATH=/opt/homebrew/Cellar/gstreamer/1.22.2/lib/pkgconfig/ + +# Homebrew lib paths +export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" +eval "$(direnv hook zsh)" +eval "$(direnv hook zsh)" + +# Certificates +export REQUESTS_CA_BUNDLE=~/helsing-cert-bundle.pem +export SSL_CERT_FILE=~/helsing-cert-bundle.pem + +# Rsync +REMOTE_USER="coder" +REMOTE_HOST="coder.omaressaid.main" + +rpull() { + local current_folder=$(basename "$(pwd)") + + if [[ "$(pwd)" == "$HOME/dev/remote/$current_folder" ]]; then + rsync -avz $REMOTE_USER@$REMOTE_HOST:~/dev/$current_folder/ ~/dev/remote/$current_folder/ + else + echo "Error: This doesn't seem to be a valid rsync directory." + fi +} + +rpush() { + local current_folder=$(basename "$(pwd)") + + if [[ "$(pwd)" == "$HOME/dev/remote/$current_folder" ]]; then + rsync -avz ~/dev/remote/$current_folder/ $REMOTE_USER@$REMOTE_HOST:~/dev/$current_folder/ + else + echo "Error: This doesn't seem to be a valid rsync directory." + fi +} + +autoload -Uz compinit +zstyle ':completion:*' menu select