diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index f8736b5..49e7875 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -17,6 +17,10 @@ starship = "latest" "npm:vscode-langservers-extracted" = "latest" tmux = "latest" fzf = "latest" +java = "26" +ast-grep = "latest" +bat = "latest" +stylua = "latest" talosctl = "latest" k9s = "latest" kubectl = "latest" diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index 37f0b46..e1d5467 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -12,7 +12,9 @@ vim.cmd([[set listchars=tab:▸\ ,eol:¬]]) vim.keymap.set("n", "r", ":edit $MYVIMRC") vim.keymap.set("n", "f", vim.lsp.buf.format) vim.keymap.set("n", "D", vim.lsp.buf.definition) -vim.keymap.set("n", "U", function() MiniExtra.pickers.lsp({ scope = "references" }) end) +vim.keymap.set("n", "U", function() + MiniExtra.pickers.lsp({ scope = "references" }) +end) vim.keymap.set("n", "p", vim.lsp.buf.hover, { desc = "LSP Hover" }) vim.keymap.set("n", "l", ":set list!") vim.keymap.set("n", "]", ":bn") @@ -21,45 +23,50 @@ vim.keymap.set("n", "d", ":bd") vim.keymap.set("n", "", ":nohlsearch") vim.keymap.set("n", "", "zz") vim.keymap.set("n", "w", ":update") -vim.keymap.set("n", "", function() FzfLua.files() end) +vim.keymap.set("n", "", function() + FzfLua.files() +end) vim.keymap.set("n", "h", ":Pick help") -vim.keymap.set("n", "cz", function() require("chezmoi.pick").mini() end) -- Pick from chezmoi managed files +vim.keymap.set("n", "cz", function() + require("chezmoi.pick").mini() +end) -- Pick from chezmoi managed files -vim.pack.add( +vim.pack.add({ + { src = "https://github.com/andythigpen/nvim-coverage" }, -- Code coverage visualuzer + { src = "https://github.com/folke/lazydev.nvim" }, -- Lua Vim types + { src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup { - { src = "https://github.com/andythigpen/nvim-coverage" }, -- Code coverage visualuzer - { src = "https://github.com/esmuellert/nvim-eslint" }, -- Linter - { src = "https://github.com/folke/lazydev.nvim" }, -- Lua Vim types - { src = "https://github.com/ibhagwan/fzf-lua" }, -- FZF Fuzzy Finder - { src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup - { src = "https://github.com/kylechui/nvim-surround", version = vim.version.range("^4.0.0") }, - { src = "https://github.com/lewis6991/gitsigns.nvim" }, -- Show git changes in the gutter - { src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter - { src = "https://github.com/neovim/nvim-lspconfig" }, -- Common LSP Configurations - { src = "https://github.com/nvim-lua/plenary.nvim" }, -- Base functions library - { src = "https://github.com/nvim-mini/mini.extra" }, -- Additional things for mini tools - { src = "https://github.com/nvim-mini/mini.icons" }, -- Icons for Ctrl-P - { src = "https://github.com/nvim-mini/mini.pick" }, -- Ctrl-P Alternative - { src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics - { src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme - { src = "https://github.com/sbdchd/neoformat" }, -- Formatter - { src = "https://github.com/tpope/vim-fugitive" }, -- Git bindings - { src = "https://github.com/vim-airline/vim-airline" }, -- Status bar - { src = "https://github.com/vim-airline/vim-airline-themes" }, -- Status bar theme - { src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager - } -) + src = "https://github.com/kylechui/nvim-surround", + version = vim.version.range("^4.0.0"), + }, -- Surround + { src = "https://github.com/lewis6991/gitsigns.nvim" }, -- Show git changes in the gutter + { src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter + { src = "https://github.com/neovim/nvim-lspconfig" }, -- Common LSP Configurations + { src = "https://github.com/nvim-lua/plenary.nvim" }, -- Base functions library + { src = "https://github.com/nvim-mini/mini.extra" }, -- Additional things for mini tools + { src = "https://github.com/nvim-mini/mini.icons" }, -- Icons for Ctrl-P + { src = "https://github.com/nvim-mini/mini.pick" }, -- Ctrl-P Alternative + { src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics + { src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme + { src = "https://github.com/sbdchd/neoformat" }, -- Formatter + { src = "https://github.com/tpope/vim-fugitive" }, -- Git bindings + { src = "https://github.com/vim-airline/vim-airline-themes" }, -- Status bar theme + { src = "https://github.com/vim-airline/vim-airline" }, -- Status bar + { src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager + { src = "https://github.com/esmuellert/nvim-eslint" }, -- Linter + { src = "https://github.com/ibhagwan/fzf-lua" }, -- FZF Fuzzy Finder +}) -- Airline -vim.cmd [[ +vim.cmd([[ let g:airline#extensions#tabline#enabled = 1 -]] +]]) -- Ctrl-P require("mini.pick").setup() require("mini.icons").setup() require("mini.extra").setup() -require("fzf-lua").setup({ 'fzf-tmux' }) +require("fzf-lua").setup({ "fzf-tmux" }) -- Coverage require("coverage").setup() @@ -67,93 +74,91 @@ require("coverage").setup() -- Lint require("lint").linters_by_ft = { sh = { "shellcheck" }, - ts = { "oxlint" }, } vim.api.nvim_create_autocmd({ "BufWritePost" }, { - callback = function() - require("lint").try_lint() - end, + callback = function() + require("lint").try_lint() + end, }) -- Theme -vim.cmd.colorscheme "kanagawa-dragon" +vim.cmd.colorscheme("kanagawa-dragon") -- LSP -vim.lsp.enable({ "lua_ls", "ts_ls", "bashls", "yamlls", "graphql", "jsonls", "oxlint" }) +vim.lsp.enable({ "lua_ls", "ts_ls", "bashls", "yamlls", "graphql", "jsonls" }) ---@type vim.lsp.Config local lua_ls_config = { - ---@type lspconfig.settings.lua_ls - settings = { - Lua = { - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - } - } - } + ---@type lspconfig.settings.lua_ls + settings = { + Lua = { + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + }, + }, } vim.lsp.config("lua_ls", lua_ls_config) -- Autocomplete vim.o.autocomplete = true -vim.api.nvim_create_autocmd('LspAttach', { - callback = function(ev) - local client = assert(vim.lsp.get_client_by_id(ev.data.client_id)) - if client:supports_method('textDocument/completion') then - vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) - end - vim.keymap.set('i', '', function() - vim.lsp.completion.get() - end, { buffer = ev.buf }) - end, +vim.api.nvim_create_autocmd("LspAttach", { + callback = function(ev) + local client = assert(vim.lsp.get_client_by_id(ev.data.client_id)) + if client:supports_method("textDocument/completion") then + vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) + end + vim.keymap.set("i", "", function() + vim.lsp.completion.get() + end, { buffer = ev.buf }) + end, }) vim.opt.complete:append("o") -vim.opt.completeopt = { 'menuone', 'noselect', 'fuzzy' } +vim.opt.completeopt = { "menuone", "noselect", "fuzzy" } -- Fidget -require("fidget").setup {} - +require("fidget").setup({}) -- Diagnostic -require('tiny-inline-diagnostic').setup() +require("tiny-inline-diagnostic").setup() vim.diagnostic.config({ virtual_text = false }) -- Chezmoi -require("chezmoi").setup { - edit = { - watch = false, - force = false, - ignore_patterns = { - "run_onchange_.*", - "run_once_.*", - "%.chezmoiignore", - "%.chezmoitemplate", - -- Add custom patterns here - }, - }, - events = { - on_open = { - notification = { - enable = true, - msg = "Opened a chezmoi-managed file", - opts = {}, - }, - }, - on_watch = { - notification = { - enable = true, - msg = "This file will be automatically applied", - opts = {}, - }, - }, - on_apply = { - notification = { - enable = true, - msg = "Successfully applied", - opts = {}, - }, - }, - }, -} +require("chezmoi").setup({ + edit = { + watch = false, + force = false, + ignore_patterns = { + "run_onchange_.*", + "run_once_.*", + "%.chezmoiignore", + "%.chezmoitemplate", + -- Add custom patterns here + }, + }, + events = { + on_open = { + notification = { + enable = true, + msg = "Opened a chezmoi-managed file", + opts = {}, + }, + }, + on_watch = { + notification = { + enable = true, + msg = "This file will be automatically applied", + opts = {}, + }, + }, + on_apply = { + notification = { + enable = true, + msg = "Successfully applied", + opts = {}, + }, + }, + }, +}) -- Surround require("nvim-surround").setup({}) diff --git a/dot_config/starship.toml b/dot_config/starship.toml index f5321d3..e0b569f 100644 --- a/dot_config/starship.toml +++ b/dot_config/starship.toml @@ -1,3 +1,10 @@ +"$schema" = 'https://starship.rs/config-schema.json' +[custom.arch] +command = 'arch' +when = true +format = 'on [$output]($style) ' +disabled = true + [gcloud] format = 'on [$symbol(\($project\))]($style) '