diff --git a/cursor/.config/Cursor/User/settings.json b/cursor/.config/Cursor/User/settings.json index 25e5973..ae0c414 100644 --- a/cursor/.config/Cursor/User/settings.json +++ b/cursor/.config/Cursor/User/settings.json @@ -1,34 +1,58 @@ { + // Editor general settings "editor.tabSize": 2, "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.fontFamily": "'FiraCode Nerd Font Mono', Consolas, 'Courier New', monospace", "editor.fontSize": 16, "editor.minimap.enabled": true, - "editor.scrollbar.vertical": "auto", + "editor.scrollbar.vertical": "auto", "editor.scrollbar.horizontal": "auto", - "window.titleBarStyle": "custom", + "editor.selectionClipboard": false, + "editor.accessibilitySupport": "off", + + // Workbench settings "workbench.colorTheme": "Catppuccin Mocha", "workbench.iconTheme": "catppuccin-mocha", + "workbench.tree.indent": 30, + "workbench.tree.renderIndentGuides": "always", + "workbench.tree.enableStickyScroll": true, + "workbench.tree.stickyScrollMaxItemCount": 10, + "workbench.editor.showTabs": "single", + + // Window settings + "window.titleBarStyle": "custom", + "window.customTitleBarVisibility": "auto", + + // Terminal settings "terminal.integrated.defaultProfile.windows": "PowerShell", + "terminal.integrated.defaultProfile.linux": "zsh", "terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono', monospace", "terminal.integrated.fontSize": 16, + + // Debug settings + "debug.console.fontFamily": "FiraCode Nerd Font Mono", + "debug.console.fontSize": 16, + + // Explorer settings + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + + // File associations + "files.associations": { + "*.css": "tailwindcss" + }, + + // Language specific settings + // Go "go.addTags": { "options": "", "promptForTags": true, "transform": "camelcase" }, "go.toolsManagement.autoUpdate": true, - "emeraldwalk.runonsave": { - "commands": [ - { - "match": "\\.go$", - "cmd": "golines ${file} -w --base-formatter goimports-reviser -m 80 -t 2" - } - ] - }, - "terminal.integrated.defaultProfile.linux": "zsh", - "extensions.ignoreRecommendations": true, + + // SQL "[sql]": { "editor.formatOnSave": false, "editor.defaultFormatter": "inferrinizzard.prettier-sql-vscode" @@ -37,49 +61,70 @@ "Prettier-SQL.commaPosition": "after", "Prettier-SQL.indentStyle": "tabularRight", "Prettier-SQL.keywordCase": "upper", + + // TypeScript/React "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "workbench.tree.indent": 30, - "workbench.tree.renderIndentGuides": "always", - "workbench.tree.enableStickyScroll": true, - "workbench.tree.stickyScrollMaxItemCount": 10, - "explorer.confirmDelete": false, - "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "files.associations": { - "*.css": "tailwindcss" + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "prettier.requireConfig": true, - "editor.accessibilitySupport": "off", - "explorer.confirmDragAndDrop": false, - "[html]": { + "typescript.updateImportsOnFileMove.enabled": "always", + + // JSON/JSONC + "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + + // HTML + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + + // TOML "[toml]": { "editor.defaultFormatter": "tamasfe.even-better-toml" }, - "cursor.chat.smoothStreaming": true, - "debug.console.fontFamily": "FiraCode Nerd Font Mono", - "debug.console.fontSize": 16, - "git.openRepositoryInParentFolders": "never", - "typescript.updateImportsOnFileMove.enabled": "always", "evenBetterToml.formatter.indentEntries": true, "evenBetterToml.formatter.indentTables": true, "evenBetterToml.formatter.trailingNewline": true, - "window.customTitleBarVisibility": "auto", - "workbench.editor.showTabs": "single", - "cursor.cpp.enablePartialAccepts": true, - "editor.selectionClipboard": false, + + // Prettier + "prettier.requireConfig": true, + + // Git + "git.openRepositoryInParentFolders": "never", + + // Cursor specific settings + "cursor.chat.smoothStreaming": true, "cursor.chat.showSuggestedFiles": true, "cursor.chat.collapseInputBoxPills": true, "cursor.chat.premiumChatAutoScrollWhenAtBottom": true, - "cursor.cmdk.useThemedDiffBackground": true + "cursor.cmdk.useThemedDiffBackground": true, + "cursor.cpp.enablePartialAccepts": true, + + // Run on save + "emeraldwalk.runonsave": { + "commands": [ + { + "match": "\\.go$", + "cmd": "golines ${file} -w --base-formatter goimports-reviser -m 80 -t 2" + } + ] + }, + + // Extensions + "extensions.ignoreRecommendations": true, + + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact" + ], + "nix.formatterPath": "/run/current-system/sw/bin/nixfmt", } + diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index ef788c3..5c5b065 100755 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,30 +1,25 @@ { - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "2b6860d15aaab01d3fb90859c0ba97f20ad7bc5f" }, - "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "copilot.vim": { "branch": "release", "commit": "53d3091be388ff1edacdb84421ccfa19a446a84d" }, - "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, - "lazy.nvim": { "branch": "main", "commit": "ff904178089582f90fdc625493f3d3bddbefd6ea" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, - "new-file-template.nvim": { "branch": "master", "commit": "e4d0654225326816a80545c97f31f57407658e34" }, - "none-ls.nvim": { "branch": "main", "commit": "8691504118b252d64fc5023a104aedd100ab754a" }, - "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, - "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, - "nvim-lspconfig": { "branch": "master", "commit": "d1ab6b6051976b04948e127b0f302a465b1394d6" }, - "nvim-treesitter": { "branch": "master", "commit": "fc9ee79f64b18bf431e862c2462d4f76d488492a" }, - "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "none-ls.nvim": { "branch": "main", "commit": "1f2bf17eddfdd45aed254b6922c6c68b933dba9e" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, + "nvim-lspconfig": { "branch": "master", "commit": "291a8f1a319dc712db85bcc174b0cf406f0a5b69" }, + "nvim-treesitter": { "branch": "master", "commit": "cd2acc803b9e2f9377fb31fbeb993f6e363466f5" }, + "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "trouble.nvim": { "branch": "main", "commit": "6ce015ea999879364e35f20da3e8687583d3b719" }, - "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, - "vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" }, - "vim-dadbod-ui": { "branch": "master", "commit": "0dc68d9225a70d42f8645049482e090c1a8dce25" }, - "which-key.nvim": { "branch": "main", "commit": "d87c01c9bbcc7c1c2d248dca1b11285259d66be8" } -} \ No newline at end of file + "trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, + "which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" } +} diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua deleted file mode 100755 index fc91cbf..0000000 --- a/nvim/.config/nvim/lua/plugins/copilot.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - { - "github/copilot.vim", - }, -} diff --git a/nvim/.config/nvim/lua/plugins/dadbod.lua b/nvim/.config/nvim/lua/plugins/dadbod.lua deleted file mode 100644 index f746063..0000000 --- a/nvim/.config/nvim/lua/plugins/dadbod.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - { - "tpope/vim-dadbod", - dependencies = { - "kristijanhusak/vim-dadbod-completion", - }, - }, - { - "kristijanhusak/vim-dadbod-ui", - config = function() - vim.g.db_ui_use_nerd_fonts = 1 - vim.keymap.set("n", "db", function() - vim.cmd.DBUIToggle() - end) - - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "sql", - "mysql", - "plsql", - }, - callback = function() - require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } }) - end, - }) - end, - }, -} diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua index 4e8f2a1..c444aae 100755 --- a/nvim/.config/nvim/lua/plugins/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -13,8 +13,6 @@ return { require("mason-lspconfig").setup({ ensure_installed = { "lua_ls", - "gopls", - "tsserver", }, }) end, @@ -26,8 +24,6 @@ return { require("mason-tool-installer").setup({ ensure_installed = { "stylua", - "golines", - "goimports-reviser", }, }) end, @@ -84,14 +80,6 @@ return { on_attach = on_attach, capabilities = capabilities, }) - lspconfig.gopls.setup({ - on_attach = on_attach, - capabilities = capabilities, - }) - lspconfig.tsserver.setup({ - on_attach = on_attach, - capabilities = capabilities, - }) end, }, { @@ -102,9 +90,6 @@ return { null_ls.setup({ sources = { null_ls.builtins.formatting.stylua, - null_ls.builtins.formatting.golines.with({ - extra_args = { "--base-formatter", "goimports-reviser", "-m", "120", "-t", "2" }, - }), }, }) diff --git a/nvim/.config/nvim/lua/plugins/newfiletemplate.lua b/nvim/.config/nvim/lua/plugins/newfiletemplate.lua deleted file mode 100644 index 0d2b8c7..0000000 --- a/nvim/.config/nvim/lua/plugins/newfiletemplate.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "otavioschwanck/new-file-template.nvim", - config = function() - require("new-file-template").setup() - end, - }, -} diff --git a/nvim/.config/nvim/lua/templates/go.lua b/nvim/.config/nvim/lua/templates/go.lua deleted file mode 100644 index 2237cf7..0000000 --- a/nvim/.config/nvim/lua/templates/go.lua +++ /dev/null @@ -1,14 +0,0 @@ -local utils = require("new-file-template.utils") - -return function(opts) - local function base_template(path) - local foldername = path:match("([^/]+)[/]?$") - return [[package ]] .. foldername .. [[\n\n|cursor|]] - end - - local template = { - { pattern = ".*", content = base_template }, - } - - return utils.find_entry(template, opts) -end diff --git a/nvim/.config/nvim/lua/user/options.lua b/nvim/.config/nvim/lua/user/options.lua index 4c6ac29..d0a93d9 100755 --- a/nvim/.config/nvim/lua/user/options.lua +++ b/nvim/.config/nvim/lua/user/options.lua @@ -80,4 +80,3 @@ vim.opt.guicursor = { "sm:block-blinkwait175-blinkoff150-blinkon175", -- Showmatch: block cursor with specific blinking settings } -vim.g.db = "postgres://sorare:sorare@192.168.1.250:5436/sorare?sslmode=disable" diff --git a/zsh/.zshrc b/zsh/.zshrc index 403ab9a..4f2adca 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -11,36 +11,24 @@ zinit light zsh-users/zsh-syntax-highlighting zinit light zsh-users/zsh-completions zinit light zsh-users/zsh-autosuggestions zinit light Aloxaf/fzf-tab +zinit light fdw/yazi-zoxide-zsh zinit snippet OMZP::git zinit snippet OMZP::sudo zinit snippet OMZP::archlinux autoload -Uz compinit && compinit - zinit cdreplay -q eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/config.json)" # Keybindings bindkey -e -bindkey '^p' history-search-backward -bindkey '^n' history-search-forward -bindkey '^[w' kill-region - -# Bind Home key to beginning-of-line -bindkey '^[[H' beginning-of-line -bindkey '^[[1~' beginning-of-line - -# Bind End key to end-of-line -bindkey '^[[F' end-of-line -bindkey '^[[4~' end-of-line - -bindkey '^[[3~' delete-char # History HISTSIZE=5000 -HISTFILE=~/.zsh_history +mkdir -p "${XDG_STATE_HOME:-$HOME/.local/state}/zsh" +HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/zsh/history" SAVEHIST=$HISTSIZE HISTDUP=erase setopt appendhistory @@ -51,6 +39,7 @@ setopt hist_save_no_dups setopt hist_ignore_dups setopt hist_find_no_dups + # Completion styling zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" @@ -62,38 +51,20 @@ zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' alias ls="eza" alias ll="eza -alh" alias tree="eza --tree" -alias zz="cd -" alias dcupd="docker compose up -d --remove-orphans" alias dcdown="docker compose down" alias dclogs="docker logs -f --tail 100" alias vi="nvim" alias vim="nvim" alias lg="lazygit" -alias cc="clear" -alias sgpts="sgpt --shell" # Shell integrations eval "$(fzf --zsh)" eval "$(zoxide init --cmd cd zsh)" # bun completions -[ -s "/home/laurent/.bun/_bun" ] && source "/home/laurent/.bun/_bun" +export BUN_INSTALL="${bun_install:-$HOME/.bun}" +[ -s "$BUN_INSTALL/_bun" ] && source "$BUN_INSTALL/_bun" -# Shell-GPT integration ZSH v0.2 -_sgpt_zsh() { -if [[ -n "$BUFFER" ]]; then - _sgpt_prev_cmd=$BUFFER - BUFFER+="⌛" - zle -I && zle redisplay - BUFFER=$(sgpt --shell <<< "$_sgpt_prev_cmd" --no-interaction) - zle end-of-line -fi -} -zle -N _sgpt_zsh -bindkey ^l _sgpt_zsh -# Shell-GPT integration ZSH v0.2 - -# bun -export BUN_INSTALL="$HOME/.bun" -export PATH="$HOME/go/bin:$BUN_INSTALL/bin:$HOME/.local/bin:$PATH" export TERM=xterm-256color +export PATH="$HOME/go/bin:$BUN_INSTALL/bin:$HOME/.local/bin:$PATH"