Something went wrong. Try again.
My dotfiles for my macOS setup
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503-- Bootstrap lazy.nvimlocal lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = "https://github.com/folke/lazy.nvim.git" local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) if vim.v.shell_error ~= 0 then vim.api.nvim_echo({ { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, { out, "WarningMsg" }, { "\nPress any key to exit..." }, }, true, {}) vim.fn.getchar() os.exit(1) endendvim.opt.rtp:prepend(lazypath)vim.g.mapleader = " "vim.g.maplocalleader = "\\"-- Setup lazy.nvimrequire("lazy").setup({ -- Barbecue + dependencies --[[ { "utilyre/barbecue.nvim", name = "barbecue", version = "*", dependencies = { "SmiteshP/nvim-navic", }, opts = {}, }, ]] -- Lualine { "nvim-lualine/lualine.nvim", lazy = true, opt = true, }, -- Oil "stevearc/oil.nvim", --[[ -- LSP + dependencies { "neovim/nvim-lspconfig", event = { "BufReadPre", "BufNewFile" }, dependencies = { "folke/neodev.nvim", }, }, ]] -- CMP + dependencies { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-path", "hrsh7th/cmp-cmdline", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp", "rafamadriz/friendly-snippets", "onsails/lspkind.nvim", }, }, -- Autopairs { "windwp/nvim-autopairs", event = "InsertEnter", }, -- Treesitter + dependencies { "JoosepAlviste/nvim-ts-context-commentstring", opts = { enable_autocmd = false, }, }, { "windwp/nvim-ts-autotag", opts = {}, }, { "nvim-treesitter/nvim-treesitter-textobjects", branch = "main", event = { "BufReadPost", "BufNewFile" }, dependencies = { "nvim-treesitter/nvim-treesitter" }, opts = { select = { enable = true, lookahead = true, keymaps = { ["af"] = { query = "@function.outer", desc = "Around the function" }, ["if"] = { query = "@function.inner", desc = "Inside the function" }, ["ac"] = { query = "@class.outer", desc = "Around the class" }, ["ic"] = { query = "@class.inner", desc = "Inside the class" }, ["aI"] = { query = "@conditional.outer", desc = "Around the conditional" }, ["iI"] = { query = "@conditional.inner", desc = "Inside the conditional" }, ["aL"] = { query = "@loop.outer", desc = "Around the loop" }, ["iL"] = { query = "@loop.inner", desc = "Inside the loop" }, ["aC"] = { query = "@comment.outer", desc = "Around the comment" }, ["iC"] = { query = "@comment.inner", desc = "Inside the comment" }, ["as"] = { query = "@scope", desc = "Language scope" }, }, }, move = { enable = true, set_jumps = true, goto_next_start = { ["]f"] = { query = "@function.*", desc = "Next function start" }, ["]c"] = { query = "@class.*", desc = "Next class start" }, ["]l"] = { query = "@loop.*", desc = "Go to next loop part" }, ["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" }, ["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" }, }, goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", }, goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", }, goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", }, goto_next = { ["]I"] = "@conditional.outer", }, goto_previous = { ["[I"] = "@conditional.outer", }, }, }, }, { "nvim-treesitter/nvim-treesitter", dependencies = { "OXY2DEV/markview.nvim" }, lazy = false, branch = "main", build = ":TSUpdate", event = { "BufReadPost", "BufNewFile" }, config = function() require("nvim-treesitter").setup() require("nvim-treesitter").install({ "astro", "bash", "bibtex", "cpp", "css", "gitcommit", "gitignore", "gleam", "go", "haskell", "html", "java", "javascript", "json", "kotlin", "lua", "luadoc", "ocaml", "php", "python", "regex", "ruby", "rust", "slint", "sql", "templ", "toml", "tsx", "typescript", "typst", "yaml", "svelte", "vue", "zig", }) end, init = function() vim.api.nvim_create_autocmd("FileType", { callback = function() pcall(vim.treesitter.start) vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end, }) end, }, { "OXY2DEV/markview.nvim", lazy = false,
-- For `nvim-treesitter` users. priority = 49,
-- For blink.cmp's completion -- source -- dependencies = { -- "saghen/blink.cmp" -- }, }, -- No-neck-pain -- { "shortcuts/no-neck-pain.nvim", version = "*" }, -- Conform { "stevearc/conform.nvim", event = "BufReadPre", }, -- Rustacean { "mrcjkb/rustaceanvim", version = "^6", -- Recommended ft = { "rust" }, }, -- todo-comments.nvim { "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, event = { "BufNewFile", "BufReadPost" }, keys = { { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment (Todo)", }, { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment (Todo)", }, { "<leader>xt", function() vim.cmd.Trouble("todo toggle focus=true filter = {tag = {FIX,TODO,HACK,WARN}}") end, desc = "Todo actionable comments (Trouble)", }, { "<leader>xT", function() vim.cmd.Trouble("todo toggle focus=true") end, desc = "Todo all comments (Trouble)", }, }, opts = { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below }, }, -- trouble.nvim { "folke/trouble.nvim", opts = {}, -- for default options, refer to the configuration section for custom setup. cmd = "Trouble", keys = { { "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)", }, { "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)", }, { "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>", desc = "Symbols (Trouble)", }, { "<leader>cl", "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", desc = "LSP Definitions / references / ... (Trouble)", }, { "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)", }, { "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)", }, }, }, -- Typst { "kaarmu/typst.vim", ft = "typst", lazy = false, }, -- Tokyonight { "folke/tokyonight.nvim", opts = { style = "night", transparent = true, on_colors = function(colors) colors.green = "#62d196" colors.comment = "#86a1db" colors.gitSigns = { add = "#62d196", change = "#7dcfff", delete = "#f7768e", } end, styles = { floats = "transparent", sidebars = "transparent", comments = { italic = false }, keywords = { italic = false }, }, }, }, -- Gitsigns { "lewis6991/gitsigns.nvim", lazy = false, opts = {}, }, -- Devicons { "nvim-tree/nvim-web-devicons", opts = { override_by_extension = { lua = { icon = "", color = "#4d5beb", --color = "#003ab8", name = "Lua", }, rs = { icon = "", color = "#ff9e64", --color = "#ff832b", name = "Rust", }, rb = { icon = "", color = "#f7768e", name = "Ruby", }, csv = { icon = "", color = "#6fdc8c", name = "CSV", }, py = { icon = "", color = "#6fdc8c", name = "Python", }, go = { icon = "", color = "#7dcfff", name = "Go", }, ["go.mod"] = { icon = "", color = "#6fdc8c", name = "GoMod", }, ["go.sum"] = { icon = "", color = "#f7768c", name = "GoSum", }, cpp = { icon = "", color = "#5e99ff", name = "CPP", }, c = { icon = "", color = "#BB9AF7", --color = "#6929c4", name = "C", }, tex = { icon = "", color = "#c0caf5", name = "LaTeX", }, md = { icon = "", color = "#c0caf5", name = "Markdown", }, vim = { icon = "", color = "#6fdc8c", name = "Vim", }, vue = { icon = "", color = "#62d196", --#289c5e name = "Vue", }, nix = { icon = "", color = "#33b1ff", name = "Nix", }, ts = { icon = "", color = "#6bb8ff", --5e99ff name = "Typescript", }, js = { icon = "", color = "#ffd12b", name = "Javascript", }, ["tsx"] = { icon = "", color = "#6fb8fc", name = "Tsx", }, ["nuxt.config.ts"] = { icon = "", color = "#289c5e", name = "Nuxt", }, ["Cargo.toml"] = { icon = "", color = "#ff9e64", name = "Cargo.toml", }, ["gleam"] = { icon = "", color = "#FFAFF3", name = "Gleam", }, ["typ"] = { icon = "", color = "#6fdcbb", name = "Typst", }, ["slint"] = { icon = "", color = "#5e99ff", name = "Slint", }, }, }, }, --[[ -- ruby.lsp { "adam12/ruby-lsp.nvim", dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig", }, config = true, opts = { auto_install = false, lspconfig = { init_options = { formatter = "standard", linters = { "standard" }, }, }, }, }, ]] -- Dropbar { "Bekaboo/dropbar.nvim", -- optional, but required for fuzzy finder support dependencies = { "nvim-telescope/telescope-fzf-native.nvim", build = "make", }, config = function() local dropbar_api = require("dropbar.api") vim.keymap.set("n", "<Leader>;", dropbar_api.pick, { desc = "Pick symbols in winbar" }) vim.keymap.set("n", "[;", dropbar_api.goto_context_start, { desc = "Go to start of current context" }) vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" }) end, }, -- Cord { "vyfor/cord.nvim", build = ":Cord update", }, -- teide.nvim { "serhez/teide.nvim", lazy = false, priority = 1000, opts = {}, },})