diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bab25ed Binary files /dev/null and b/.DS_Store differ diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..4693430 --- /dev/null +++ b/.zshrc @@ -0,0 +1,47 @@ +# Custom Aliases +alias hg="history | grep" +alias tcp="(tree -a -I 'node_modules|objects|*.log|target|build|dist|*.lock|Pods|.DS_Store|.next|.git|__tests__|screenshots|downloads|cache|media|*.map|*.nft.json|chunks|webpack-runtime.js|public' -L 6; tree -a -I 'node_modules|*.log|target|build|dist|*.lock|Pods|.DS_Store|*.map' .github/workflows) | pbcopy" + + +alias .="nvim" +alias zshconfig="nvim ~/.zshrc" + +# Git aliases +alias gs="git status" +alias ga="git add ." +alias gc="git commit -m" +alias gca="git commit --amend --no-edit" +alias gcb="git checkout -b" +alias gp='if ! git config remote.origin.url > /dev/null; then git remote add origin git@github.com:yourusername/trustystack-frontend.git; fi; git push origin $(git symbolic-ref --short HEAD)' +alias gg='git checkout -' +alias gcm='git checkout main' +alias br='git branch -a' +alias so='source ~/.zshrc' +alias gr='git restore --staged .' +alias go='npx expo start' +alias gpull='git pull' +alias gogo='RUST_LOG=debug cargo run' +alias dcu='docker compose up' +alias dcub='(cd ~/code/infra/cicd/pipelines/ && make dev-run)' +alias rtest='RUST_BACKTRACE=full cargo test -- --nocapture' +alias devrun='~/code/dev_workflow/dev_run_tmux.sh*' +alias zrc='. ~/.zshrc' +alias vrc='cd ~/.config/nvim && .' +alias gpf='gp --force' +alias gpfa='ga && gca && gpf' +alias migrate='diesel migration run' + +# Trustystack nav +alias cdp='cd ~/code/backend/python/parts' +alias cdr='cd ~/code/backend/rust' +alias cdd='cd ~/code/data/database' +alias cddoc='cd ~/code/docs' +alias cdn='cd ~/code/frontend/native' +alias cdw='cd ~/code/frontend/web' +alias cdci='cd ~/code/infra/cicd' +alias cdm='cd ~/code' +alias kill-dev='pgrep -f "rust-backend" | xargs kill && tmux kill-session -t dev_session' +alias drev='diesel migration revert --all' +alias drun='diesel migration run' +alias stash='git stash' +alias pop='git stash pop' diff --git a/nvim b/nvim deleted file mode 160000 index e148c2c..0000000 --- a/nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e148c2cdfd54d6194ce57c856d1000d8c8111d4f diff --git a/nvim_configs_test/.gitignore b/nvim/.gitignore similarity index 100% rename from nvim_configs_test/.gitignore rename to nvim/.gitignore diff --git a/nvim_configs_test/README.md b/nvim/README.md similarity index 100% rename from nvim_configs_test/README.md rename to nvim/README.md diff --git a/nvim_configs_test/init.lua b/nvim/init.lua similarity index 100% rename from nvim_configs_test/init.lua rename to nvim/init.lua diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..fccdc91 --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,36 @@ +{ + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "brightburn.vim": { "branch": "master", "commit": "fc0d2fafc51e86d6065acd54b5e82e686019ff2f" }, + "cellular-automaton.nvim": { "branch": "main", "commit": "11aea08aa084f9d523b0142c2cd9441b8ede09ed" }, + "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "gruvbox": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, + "harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, + "hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" }, + "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" }, + "lexima.vim": { "branch": "master", "commit": "f851b232505766aff7bed7d20100ad31c9c0b33b" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" }, + "nvim-lspconfig": { "branch": "master", "commit": "8121483b8132b7053120fafd83728178fb3febf6" }, + "nvim-treesitter": { "branch": "master", "commit": "622a4a6ba76d1de52b72a965159213ae655b4ac7" }, + "plenary": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "rose-pine": { "branch": "main", "commit": "66aabf210b5e736a3df5006648d4201016e05a2a" }, + "rustaceanvim": { "branch": "master", "commit": "0a1876b970ab946be3f4d341e9d743a5d62d646a" }, + "schemastore.nvim": { "branch": "main", "commit": "438f4f1f1fb890980cb23002597f99c9579834bd" }, + "telescope-luasnip.nvim": { "branch": "master", "commit": "07a2a2936a7557404c782dba021ac0a03165b343" }, + "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "tokyonight.nvim": { "branch": "main", "commit": "7bb270adaa7692c2c33befc35f5567fc596a2504" }, + "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" }, + "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" }, + "vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" }, + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } +} diff --git a/nvim/lua/theprimeagen/init.lua b/nvim/lua/theprimeagen/init.lua new file mode 100644 index 0000000..ff9512d --- /dev/null +++ b/nvim/lua/theprimeagen/init.lua @@ -0,0 +1,113 @@ +require("theprimeagen.set") +require("theprimeagen.remap") +require("theprimeagen.lazy_init") + +-- DO.not +-- DO NOT INCLUDE THIS + +-- If i want to keep doing lsp debugging +-- function restart_htmx_lsp() +-- require("lsp-debug-tools").restart({ expected = {}, name = "htmx-lsp", cmd = { "htmx-lsp", "--level", "DEBUG" }, root_dir = vim.loop.cwd(), }); +-- end + +-- DO NOT INCLUDE THIS +-- DO.not + +local augroup = vim.api.nvim_create_augroup +local ThePrimeagenGroup = augroup('ThePrimeagen', {}) + +local autocmd = vim.api.nvim_create_autocmd +local yank_group = augroup('HighlightYank', {}) + +function R(name) + require("plenary.reload").reload_module(name) +end + +vim.filetype.add({ + extension = { + templ = 'templ', + } +}) + +autocmd('TextYankPost', { + group = yank_group, + pattern = '*', + callback = function() + vim.highlight.on_yank({ + higroup = 'IncSearch', + timeout = 40, + }) + end, +}) + +autocmd({ "BufWritePre" }, { + group = ThePrimeagenGroup, + pattern = "*", + command = [[%s/\s\+$//e]], +}) + +autocmd('LspAttach', { + group = ThePrimeagenGroup, + callback = function(e) + local opts = { buffer = e.buf } + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) + vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) + vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) + vim.keymap.set("n", "vd", function() vim.diagnostic.open_float({ focusable = true }) end, opts) + vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) + --vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts) + vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) + vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) + vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) + vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) + end +}) +-- 1 +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("lsp", { clear = true }), + callback = function(args) + -- 2 + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = args.buf, + callback = function() + print("Formatting before save") + vim.lsp.buf.format { async = false, id = args.data.client_id } + end, + }) + end +}) + +vim.g.netrw_browse_split = 0 +vim.g.netrw_banner = 0 +vim.g.netrw_winsize = 25 +vim.cmd([[colorscheme gruvbox]]) + +local harpoon = require("harpoon") + +-- REQUIRED +harpoon:setup() + +-- basic telescope configuration +local conf = require("telescope.config").values +local function toggle_telescope(harpoon_files) + local file_paths = {} + for _, item in ipairs(harpoon_files.items) do + table.insert(file_paths, item.value) + end + + require("telescope.pickers").new({}, { + prompt_title = "Harpoon", + finder = require("telescope.finders").new_table({ + results = file_paths, + }), + previewer = conf.file_previewer({}), + sorter = conf.generic_sorter({}), + }):find() +end + +vim.keymap.set("n", "gl", function() toggle_telescope(harpoon:list()) end, + { desc = "Open harpoon window" }) + +vim.keymap.set("n", "gg", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) +vim.keymap.set("n", "ga", function() harpoon:list():add() end) +vim.keymap.set("n", "csn", function() harpoon:list():next() end) diff --git a/nvim_configs_test/lua/theprimeagen/lazy/cloak.lua b/nvim/lua/theprimeagen/lazy/cloak.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/cloak.lua rename to nvim/lua/theprimeagen/lazy/cloak.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy/colors.lua b/nvim/lua/theprimeagen/lazy/colors.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/colors.lua rename to nvim/lua/theprimeagen/lazy/colors.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy/fugitive.lua b/nvim/lua/theprimeagen/lazy/fugitive.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/fugitive.lua rename to nvim/lua/theprimeagen/lazy/fugitive.lua diff --git a/nvim/lua/theprimeagen/lazy/harpoon.lua b/nvim/lua/theprimeagen/lazy/harpoon.lua new file mode 100644 index 0000000..b61681f --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/harpoon.lua @@ -0,0 +1,5 @@ +return { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" } +} diff --git a/nvim_configs_test/lua/theprimeagen/lazy/init.lua b/nvim/lua/theprimeagen/lazy/init.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/init.lua rename to nvim/lua/theprimeagen/lazy/init.lua diff --git a/nvim/lua/theprimeagen/lazy/lexima.lua b/nvim/lua/theprimeagen/lazy/lexima.lua new file mode 100644 index 0000000..3058902 --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/lexima.lua @@ -0,0 +1,3 @@ +return { + "cohama/lexima.vim", +} diff --git a/nvim/lua/theprimeagen/lazy/lsp.lua b/nvim/lua/theprimeagen/lazy/lsp.lua new file mode 100644 index 0000000..eaf3f8c --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/lsp.lua @@ -0,0 +1,258 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + 'neovim/nvim-lspconfig', + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "saadparwaiz1/cmp_luasnip", + "L3MON4D3/LuaSnip", + "j-hui/fidget.nvim", + "b0o/schemastore.nvim", + }, + config = function() + local cmp = require('cmp') + local luasnip = require 'luasnip' + + local cmp_lsp = require("cmp_nvim_lsp") + local capabilities = vim.tbl_deep_extend( + "force", + {}, + vim.lsp.protocol.make_client_capabilities(), + cmp_lsp.default_capabilities() + ) + + require("fidget").setup({}) + require("mason").setup() + require("mason-lspconfig").setup({ + ensure_installed = { + "lua_ls", + --"rust_analyzer", + "ts_ls", + "sqlls", + "jsonls", + "angularls", + "clangd", + "html", + "pyright", + "biome", + }, + handlers = { + function(server_name) + require("lspconfig")[server_name].setup { + capabilities = capabilities + } + end, + zls = function() + local lspconfig = require("lspconfig") + lspconfig.zls.setup({ + root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"), + settings = { + zls = { + enable_inlay_hints = true, + enable_snippets = true, + warn_style = true, + }, + }, + }) + vim.g.zig_fmt_parse_errors = 0 + vim.g.zig_fmt_autosave = 0 + end, + ["lua_ls"] = function() + local lspconfig = require("lspconfig") + lspconfig.lua_ls.setup { + capabilities = capabilities, + settings = { + Lua = { + runtime = { version = "Lua 5.1" }, + diagnostics = { + globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, + } + } + } + } + end, + ["biome"] = function() + local lspconfig = require("lspconfig") + lspconfig.biome.setup({ + capabilities = capabilities, + root_dir = lspconfig.util.root_pattern("biome.json"), + single_file_support = true, + settings = { + biome = { + enable = true, + -- Lint on save + diagnostics = { + enable = true, + }, + -- Format on save + formatting = { + enable = true, + }, + }, + }, + }) + end, + ["html"] = function() + local lspconfig = require("lspconfig") + lspconfig.html.setup { + capabilities = capabilities, + settings = { + Lua = { + runtime = { version = "Lua 5.1" }, + diagnostics = { + globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, + } + } + } + } + end, + ["ts_ls"] = function() + local lspconfig = require("lspconfig") + local function filter(arr, fn) + if type(arr) ~= "table" then + return arr + end + + local filtered = {} + for k, v in pairs(arr) do + if fn(v, k, arr) then + table.insert(filtered, v) + end + end + + return filtered + end + + local function filterReactDTS(value) + return string.match(value.targetUri, '%.d.ts') == nil + end + lspconfig.ts_ls.setup { + handlers = { + ['textDocument/definition'] = function(err, result, method, ...) + if vim.tbl_islist(result) and #result > 1 then + local filtered_result = filter(result, filterReactDTS) + return vim.lsp.handlers['textDocument/definition'](err, filtered_result, method, ...) + end + + vim.lsp.handlers['textDocument/definition'](err, result, method, ...) + end + }, + capabilities = capabilities, + settings = { + typescript = { + enable_inlay_hints = true, + enable_snippets = true, + inlayHints = { + parameterNames = { + enabled = "all", + }, + parameterTypes = { enabled = true }, + variableTypes = { enabled = true }, + propertyDeclarationTypes = { enabled = true }, + functionLikeReturnTypes = { enabled = true }, + enumMemberValues = { enabled = true }, + }, + }, + }, + } + end, + ["rust_analyzer"] = function() end, + --["rust_analyzer"] = function() + -- local lspconfig = require("lspconfig") + -- lspconfig.rust_analyzer.setup { + -- capabilities = capabilities, + -- settings = { + -- ["rust-analyzer"] = { + -- formatting = { + -- enable = true, + -- formatOnType = false, + -- } + -- } + -- } + -- } + --end, + ["sqlls"] = function() + local lspconfig = require("lspconfig") + lspconfig.sqlls.setup { + capabilities = capabilities, + settings = { + sql = { + connections = { + { + driver = "postgres", + dataSourceName = "host=localhost port=5432 user=myuser password=mypassword dbname=mydb sslmode=disable", + }, + }, + }, + }, + } + end, + ["jsonls"] = function() + local lspconfig = require("lspconfig") + lspconfig.jsonls.setup { + capabilities = capabilities, + settings = { + json = { + schemas = require('schemastore').json.schemas(), + validate = { enable = true }, + }, + }, + } + end, + ["angularls"] = function() + local lspconfig = require("lspconfig") + lspconfig.angularls.setup { + capabilities = capabilities, + root_dir = lspconfig.util.root_pattern("angular.json"), + } + end, + ["clangd"] = function() + local lspconfig = require("lspconfig") + lspconfig.clangd.setup { + capabilities = capabilities, + filetypes = { "swift", "c", "cpp", "objective-c", "objective-cpp" }, + root_dir = lspconfig.util.root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git"), + } + end, + } + }) + + local cmp_select = { behavior = cmp.SelectBehavior.Select } + + cmp.setup({ + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.select_prev_item(cmp_select), + [''] = cmp.mapping.select_next_item(cmp_select), + [''] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.complete(), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, { + { name = 'buffer' }, + }) + }) + + vim.diagnostic.config({ + float = { + focusable = false, + style = "minimal", + border = "rounded", + source = "always", + header = "", + prefix = "", + }, + }) + end +} diff --git a/nvim/lua/theprimeagen/lazy/luasnip.lua b/nvim/lua/theprimeagen/lazy/luasnip.lua new file mode 100644 index 0000000..b91542d --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/luasnip.lua @@ -0,0 +1,24 @@ +return { + "L3MON4D3/LuaSnip", + event = "LspAttach", + version = "v2.*", + build = "make install_jsregexp", + dependencies = { + "rafamadriz/friendly-snippets", + "benfowler/telescope-luasnip.nvim", + }, + config = function(_, opts) + if opts then require("luasnip").config.setup(opts) end + vim.tbl_map( + function(type) require("luasnip.loaders.from_" .. type).lazy_load() end, + { "vscode", "snipmate", "lua" } + ) + local ls = require("luasnip") + ls.filetype_extend("typescript", { "tsx" }) + ls.filetype_extend("typescriptreact", { "html" }) + ls.filetype_extend("html", { "typescriptreact" }) + ls.filetype_extend("typescript", { "tsdoc" }) + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./snippets" } }) + end, +} diff --git a/nvim/lua/theprimeagen/lazy/rustaceannvim.lua b/nvim/lua/theprimeagen/lazy/rustaceannvim.lua new file mode 100644 index 0000000..82ee568 --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/rustaceannvim.lua @@ -0,0 +1,5 @@ +return { + 'mrcjkb/rustaceanvim', + version = '^5', + lazy = false, +} diff --git a/nvim/lua/theprimeagen/lazy/telescope.lua b/nvim/lua/theprimeagen/lazy/telescope.lua new file mode 100644 index 0000000..f24c823 --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/telescope.lua @@ -0,0 +1,44 @@ +return { + "nvim-telescope/telescope.nvim", + + tag = "0.1.5", + + dependencies = { + "nvim-lua/plenary.nvim" + }, + + config = function() + require('telescope').setup({ + file_ignore_patterns = { + "node_modules/.*", + "%.env", + "yarn.lock", + "package-lock.json", + "package%-lock.json", + "lazy-lock.json", + "init.sql", + "target/.*", + ".git/.*", + ".mod.rs*", + }, + }) + + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'gr', builtin.lsp_references, {}) + vim.keymap.set('n', 'pf', builtin.find_files, {}) + vim.keymap.set('n', 'pa', builtin.git_files, {}) + vim.keymap.set('n', 'pw', function() + local word = vim.fn.expand("") + builtin.grep_string({ search = word }) + end) + vim.keymap.set('n', 'pWs', function() + local word = vim.fn.expand("") + builtin.grep_string({ search = word }) + end) + vim.keymap.set('n', 'f', function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }) + end) + vim.keymap.set('n', 'pg', builtin.live_grep, {}) + vim.keymap.set('n', 'vh', builtin.help_tags, {}) + end +} diff --git a/nvim/lua/theprimeagen/lazy/treesitter.lua b/nvim/lua/theprimeagen/lazy/treesitter.lua new file mode 100644 index 0000000..ec93563 --- /dev/null +++ b/nvim/lua/theprimeagen/lazy/treesitter.lua @@ -0,0 +1,50 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + -- A list of parser names, or "all" + ensure_installed = { + "vimdoc", "javascript", "typescript", "c", "lua", "rust", + "jsdoc", "bash", "html", "tsx", "css", "yaml" + }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally + auto_install = true, + + highlight = { + -- `false` will disable the whole extension + enable = true, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on "syntax" being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = { "markdown" }, + }, + autotag = { + enable = true, + filetypes = { + 'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue', 'tsx', 'jsx', + 'rescript', + 'css', 'lua', 'xml', 'php', 'markdown', "yml" + }, + }, + }) + + local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs() + treesitter_parser_config.templ = { + install_info = { + url = "https://github.com/vrischmann/tree-sitter-templ.git", + files = { "src/parser.c", "src/scanner.c" }, + branch = "master", + }, + } + + vim.treesitter.language.register("templ", "templ") + end +} diff --git a/nvim_configs_test/lua/theprimeagen/lazy/trouble.lua b/nvim/lua/theprimeagen/lazy/trouble.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/trouble.lua rename to nvim/lua/theprimeagen/lazy/trouble.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy/undotree.lua b/nvim/lua/theprimeagen/lazy/undotree.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/undotree.lua rename to nvim/lua/theprimeagen/lazy/undotree.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy/vimbegood.lua b/nvim/lua/theprimeagen/lazy/vimbegood.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/vimbegood.lua rename to nvim/lua/theprimeagen/lazy/vimbegood.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy/zenmode.lua b/nvim/lua/theprimeagen/lazy/zenmode.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy/zenmode.lua rename to nvim/lua/theprimeagen/lazy/zenmode.lua diff --git a/nvim_configs_test/lua/theprimeagen/lazy_init.lua b/nvim/lua/theprimeagen/lazy_init.lua similarity index 100% rename from nvim_configs_test/lua/theprimeagen/lazy_init.lua rename to nvim/lua/theprimeagen/lazy_init.lua diff --git a/nvim_configs_test/lua/theprimeagen/remap.lua b/nvim/lua/theprimeagen/remap.lua similarity index 80% rename from nvim_configs_test/lua/theprimeagen/remap.lua rename to nvim/lua/theprimeagen/remap.lua index 5b8e4d1..5ac18c8 100644 --- a/nvim_configs_test/lua/theprimeagen/remap.lua +++ b/nvim/lua/theprimeagen/remap.lua @@ -2,9 +2,13 @@ vim.g.mapleader = " " vim.keymap.set("n", "t", function() vim.cmd("Ex") end) vim.keymap.set("n", "q", ":qa") vim.keymap.set("n", "q", - [[lua if #vim.api.nvim_list_wins() > 1 then vim.cmd('close') else vim.cmd('qa') end]]) + [[lua if #vim.api.nvim_list_wins() > 1 then vim.cmd('close') else vim.cmd('qa') end]]) vim.keymap.set("n", "l", "l") vim.keymap.set("n", "h", "h") +vim.keymap.set("n", "k", "k") +vim.keymap.set("n", "j", "j") + + -- Mapping leader v followed by l to split to the left vim.keymap.set("n", "vl", [[vertical leftabove splitw]]) @@ -52,16 +56,16 @@ vim.keymap.set("n", "s", [[:%s/\<\>//gI< vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) vim.keymap.set( - "n", - "ee", - "oif err != nil {}Oreturn err" + "n", + "ee", + "oif err != nil {}Oreturn err" ) vim.keymap.set("n", "vpp", "e ~/.dotfiles/nvim/.config/nvim/lua/theprimeagen/packer.lua"); vim.keymap.set("n", "mr", "CellularAutomaton make_it_rain"); vim.keymap.set("n", "", function() - vim.cmd("so") + vim.cmd("so") end) -- Yank into system clipboard @@ -75,3 +79,13 @@ vim.keymap.set({ 'n', 'v' }, 'D', '"+D') -- delete line -- Paste from system clipboard vim.keymap.set('n', 'p', '"+p') -- paste after cursor vim.keymap.set('n', 'P', '"+P') -- paste before cursor + +--Harpoon +---- Write (save current file) +vim.keymap.set("n", "w", ":w", { desc = "Write current file" }) + +-- Write all (save all open buffers) +vim.keymap.set("n", "W", ":wall", { desc = "Write all buffers" }) + +-- Write and quit all +vim.keymap.set("n", "Q", ":wqall", { desc = "Write and quit all" }) diff --git a/nvim_configs_test/lua/theprimeagen/set.lua b/nvim/lua/theprimeagen/set.lua similarity index 73% rename from nvim_configs_test/lua/theprimeagen/set.lua rename to nvim/lua/theprimeagen/set.lua index 18acbf1..1811670 100644 --- a/nvim_configs_test/lua/theprimeagen/set.lua +++ b/nvim/lua/theprimeagen/set.lua @@ -3,14 +3,16 @@ vim.opt.guicursor = "" vim.opt.nu = true vim.opt.relativenumber = true -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 vim.opt.expandtab = true +vim.opt.wrap = false +vim.opt.breakindent = true +vim.opt.breakindentopt = "shift:11" vim.opt.smartindent = true -vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false @@ -29,4 +31,4 @@ vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 vim.opt.colorcolumn = "80" - +vim.g.lazyvim_prettier_needs_config = false diff --git a/nvim_configs b/nvim_configs deleted file mode 160000 index 89ac751..0000000 --- a/nvim_configs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 89ac751627beb4ed019bae7026e44e021a5b6018 diff --git a/nvim_configs_test/lazy-lock.json b/nvim_configs_test/lazy-lock.json deleted file mode 100644 index d3696c2..0000000 --- a/nvim_configs_test/lazy-lock.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "brightburn.vim": { "branch": "master", "commit": "fc0d2fafc51e86d6065acd54b5e82e686019ff2f" }, - "cellular-automaton.nvim": { "branch": "main", "commit": "11aea08aa084f9d523b0142c2cd9441b8ede09ed" }, - "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, - "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, - "gruvbox": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, - "hererocks": { "branch": "master", "commit": "8bd2fcfdd65cfa7535ce39ea372a63b0bdb8e528" }, - "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "ba9c2f0b93deb48d0a99ae0e8d8dd36f7cc286d6" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, - "nvim-lspconfig": { "branch": "master", "commit": "fdc44768a09a65140aa00c92872a5381ad486485" }, - "nvim-treesitter": { "branch": "master", "commit": "9f8c99e980f55e72148a95a0fb2e260c95f6341b" }, - "plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "rose-pine": { "branch": "main", "commit": "e4b08d74b7272cb21e4e9c71b8b9e0830fd722fe" }, - "schemastore.nvim": { "branch": "main", "commit": "bb73383589c0aab431a100a014eed6cb0e1b3832" }, - "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, - "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, - "vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" }, - "vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" }, - "vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" }, - "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } -} diff --git a/nvim_configs_test/lua/theprimeagen/init.lua b/nvim_configs_test/lua/theprimeagen/init.lua deleted file mode 100644 index 8d2ce94..0000000 --- a/nvim_configs_test/lua/theprimeagen/init.lua +++ /dev/null @@ -1,70 +0,0 @@ -require("theprimeagen.set") -require("theprimeagen.remap") -require("theprimeagen.lazy_init") - --- DO.not --- DO NOT INCLUDE THIS - --- If i want to keep doing lsp debugging --- function restart_htmx_lsp() --- require("lsp-debug-tools").restart({ expected = {}, name = "htmx-lsp", cmd = { "htmx-lsp", "--level", "DEBUG" }, root_dir = vim.loop.cwd(), }); --- end - --- DO NOT INCLUDE THIS --- DO.not - -local augroup = vim.api.nvim_create_augroup -local ThePrimeagenGroup = augroup('ThePrimeagen', {}) - -local autocmd = vim.api.nvim_create_autocmd -local yank_group = augroup('HighlightYank', {}) - -function R(name) - require("plenary.reload").reload_module(name) -end - -vim.filetype.add({ - extension = { - templ = 'templ', - } -}) - -autocmd('TextYankPost', { - group = yank_group, - pattern = '*', - callback = function() - vim.highlight.on_yank({ - higroup = 'IncSearch', - timeout = 40, - }) - end, -}) - -autocmd({"BufWritePre"}, { - group = ThePrimeagenGroup, - pattern = "*", - command = [[%s/\s\+$//e]], -}) - -autocmd('LspAttach', { - group = ThePrimeagenGroup, - callback = function(e) - local opts = { buffer = e.buf } - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts) - vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) - end -}) - -vim.g.netrw_browse_split = 0 -vim.g.netrw_banner = 0 -vim.g.netrw_winsize = 25 -vim.cmd([[colorscheme gruvbox]]) - diff --git a/nvim_configs_test/lua/theprimeagen/lazy/lsp.lua b/nvim_configs_test/lua/theprimeagen/lazy/lsp.lua deleted file mode 100644 index 28ef692..0000000 --- a/nvim_configs_test/lua/theprimeagen/lazy/lsp.lua +++ /dev/null @@ -1,238 +0,0 @@ --- lsp.lua -return { - "neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "hrsh7th/nvim-cmp", - --"L3MON4D3/LuaSnip", - --"saadparwaiz1/cmp_luasnip", - 'hrsh7th/cmp-vsnip', - 'hrsh7th/vim-vsnip', - "j-hui/fidget.nvim", - "b0o/schemastore.nvim", -- Add this line to include schemastore - }, - - config = function() - local cmp = require('cmp') - local luasnip = require 'luasnip' - local cmp_lsp = require("cmp_nvim_lsp") - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - cmp_lsp.default_capabilities()) - - require("fidget").setup({}) - require("mason").setup() - require("mason-lspconfig").setup({ - ensure_installed = { - "lua_ls", - "rust_analyzer", - "tsserver", - "sqlls", - "jsonls", - "angularls", - "clangd", - "html", - }, - handlers = { - function(server_name) -- default handler (optional) - require("lspconfig")[server_name].setup { - capabilities = capabilities - } - end, - - zls = function() - local lspconfig = require("lspconfig") - lspconfig.zls.setup({ - root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"), - settings = { - zls = { - enable_inlay_hints = true, - enable_snippets = true, - warn_style = true, - }, - }, - }) - vim.g.zig_fmt_parse_errors = 0 - vim.g.zig_fmt_autosave = 0 - end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup { - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = "Lua 5.1" }, - diagnostics = { - globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, - } - } - } - } - end, - ["html"] = function() - local lspconfig = require("lspconfig") - lspconfig.html.setup { - capabilities = capabilities, - } - end, - ["tsserver"] = function() - local lspconfig = require("lspconfig") - lspconfig.tsserver.setup { - capabilities = capabilities, - settings = { - typescript = { - enable_inlay_hints = true, - enable_snippets = true, - warn_style = true, - inlayHints = { - parameterNames = { - enabled = "all", - }, - parameterTypes = { enabled = true }, - variableTypes = { enabled = true }, - propertyDeclarationTypes = { enabled = true }, - functionLikeReturnTypes = { enabled = true }, - enumMemberValues = { enabled = true }, - }, - }, - }, - } - end, - ["rust_analyzer"] = function() - local lspconfig = require("lspconfig") - lspconfig.rust_analyzer.setup { - capabilities = capabilities, - settings = { - ["rust-analyzer"] = { - assist = { - importGranularity = "module", - importPrefix = "by_self", - }, - cargo = { - allFeatures = true, - }, - checkOnSave = { - command = "clippy", - }, - } - } - } - end, - ["sqlls"] = function() - local lspconfig = require("lspconfig") - lspconfig.sqlls.setup { - capabilities = capabilities, - settings = { - sql = { - connections = { - { - driver = "postgres", - dataSourceName = "host=localhost port=5432 user=myuser password=mypassword dbname=mydb sslmode=disable", - }, - }, - }, - }, - } - end, - ["jsonls"] = function() - local lspconfig = require("lspconfig") - lspconfig.jsonls.setup { - capabilities = capabilities, - settings = { - json = { - schemas = require('schemastore').json.schemas(), - validate = { enable = true }, - }, - }, - } - end, - ["angularls"] = function() - local lspconfig = require("lspconfig") - lspconfig.angularls.setup { - capabilities = capabilities, - root_dir = lspconfig.util.root_pattern("angular.json"), - } - end, - ["clangd"] = function() - local lspconfig = require("lspconfig") - lspconfig.clangd.setup { - capabilities = capabilities, - filetypes = { "swift", "c", "cpp", "objective-c", "objective-cpp" }, - root_dir = lspconfig.util.root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git"), - } - end,} - }) - - local cmp_select = { behavior = cmp.SelectBehavior.Select } - - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - if luasnip.expandable() then - luasnip.expand() - else - cmp.confirm({ - select = true, - }) - end - else - fallback() - end - end), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.locally_jumpable(1) then - luasnip.jump(1) - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - --{ name = 'luasnip' }, - { name = 'vsnip' }, - }, { - { name = 'buffer' }, - }) - }) - - vim.diagnostic.config({ - float = { - focusable = false, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, - }) - end -} - diff --git a/nvim_configs_test/lua/theprimeagen/lazy/snippets.lua b/nvim_configs_test/lua/theprimeagen/lazy/snippets.lua deleted file mode 100644 index f90d8f0..0000000 --- a/nvim_configs_test/lua/theprimeagen/lazy/snippets.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - { - "L3MON4D3/LuaSnip", - version = "v2.*", - build = "make install_jsregexp", - dependencies = { "rafamadriz/friendly-snippets" }, - - config = function() - local ls = require("luasnip") - ls.filetype_extend("javascript", { "jsdoc" }) - ls.filetype_extend("typescript", { "tsx" }) - ls.filetype_extend("html", { "tsx" }) - - vim.keymap.set({"i"}, "e", function() ls.expand() end, {silent = true}) - vim.keymap.set({"i", "s"}, ";", function() ls.jump(1) end, {silent = true}) - vim.keymap.set({"i", "s"}, ",", function() ls.jump(-1) end, {silent = true}) - vim.keymap.set({"i", "s"}, "", function() - if ls.choice_active() then - ls.change_choice(1) - end - end, {silent = true}) - end, - } -} - diff --git a/nvim_configs_test/lua/theprimeagen/lazy/telescope.lua b/nvim_configs_test/lua/theprimeagen/lazy/telescope.lua deleted file mode 100644 index 5b720fa..0000000 --- a/nvim_configs_test/lua/theprimeagen/lazy/telescope.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - - tag = "0.1.5", - - dependencies = { - "nvim-lua/plenary.nvim" - }, - - config = function() - require('telescope').setup({}) - - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'pf', builtin.find_files, {}) - vim.keymap.set('n', 'pa', builtin.git_files, {}) - vim.keymap.set('n', 'pw', function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - vim.keymap.set('n', 'pWs', function() - local word = vim.fn.expand("") - builtin.grep_string({ search = word }) - end) - vim.keymap.set('n', 'f', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) - end) - vim.keymap.set('n', 'pg', builtin.live_grep, {}) - vim.keymap.set('n', 'vh', builtin.help_tags, {}) - end -} diff --git a/nvim_configs_test/lua/theprimeagen/lazy/treesitter.lua b/nvim_configs_test/lua/theprimeagen/lazy/treesitter.lua deleted file mode 100644 index 32ec9ee..0000000 --- a/nvim_configs_test/lua/theprimeagen/lazy/treesitter.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - require("nvim-treesitter.configs").setup({ - -- A list of parser names, or "all" - ensure_installed = { - "vimdoc", "javascript", "typescript", "c", "lua", "rust", - "jsdoc", "bash", "html", "tsx", "css" - }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on "syntax" being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = { "markdown" }, - }, - autotag = { - enable = true, - filetypes = { - 'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue', 'tsx', 'jsx', 'rescript', - 'css', 'lua', 'xml', 'php', 'markdown' - }, - }, - }) - - local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs() - treesitter_parser_config.templ = { - install_info = { - url = "https://github.com/vrischmann/tree-sitter-templ.git", - files = {"src/parser.c", "src/scanner.c"}, - branch = "master", - }, - } - - vim.treesitter.language.register("templ", "templ") - end -} diff --git a/zshrc b/zshrc deleted file mode 100644 index 207103f..0000000 --- a/zshrc +++ /dev/null @@ -1,59 +0,0 @@ -# Source zsh-async -source "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-async/async.zsh" - -# Initialize async worker -async_init -async_start_worker async_worker -n - -# Callback function to handle the result of compinit -async_register_callback async_worker handle_compinit() { - # Actions after compinit, if needed -} - -# Load compinit asynchronously -async_job async_worker compinit -C - -# Path to your Oh My Zsh installation -export ZSH="$HOME/.oh-my-zsh" - -# Set theme and plugins -ZSH_THEME="crunch" -DISABLE_AUTO_UPDATE="true" -plugins=(git) - -# Export PATH -export PATH="$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH:$HOME/.yarn-global/bin" - -# Load Oh My Zsh -source $ZSH/oh-my-zsh.sh - -# Custom Aliases -alias hg="history | grep" -alias tcp="tree -I 'node_modules|.git|*.log|target|build|dist|*.lock|Pods' -L 3 | pbcopy" -alias .="nvim" -alias zshconfig="nvim ~/.zshrc" - -# Git aliases -alias gs="git status" -alias ga="git add ." -alias gc="git commit -m" -alias gca="git commit --amend --no-edit" -alias gcb="git checkout -b" -alias gp='if ! git config remote.origin.url > /dev/null; then git remote add origin git@github.com:yourusername/trustystack-frontend.git; fi; git push origin $(git symbolic-ref --short HEAD)' -alias gg='git checkout -' -alias gcm='git checkout main' -alias br='git branch -a' -alias so='source ~/.zshrc' - -# ruby -export PATH="$HOME/.rbenv/bin:$PATH" -eval "$(rbenv init -)" - -# NVM setup -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -# Load Angular CLI autocompletion asynchronously -async_job async_worker source <(ng completion script) -