diff --git a/brew/.config/Brewfile b/brew/.config/Brewfile new file mode 100644 index 0000000..afdd0c0 --- /dev/null +++ b/brew/.config/Brewfile @@ -0,0 +1,54 @@ +# Grace's Brew File +tap "gyoder/graceful-tap" + + + +# Programming Languages +brew "go" +brew "rustup", postinstall: "${HOMEBREW_PREFIX}/opt/rustup/bin/rustup default stable && ${HOMEBREW_PREFIX}/opt/rustup/bin/rustup component add rust-analyzer" +brew "uv" +brew "llvm" +brew "cmake" +brew "make" +brew "node" +brew "npm" +brew "typst" +brew "zig" + +# Shell Stuff +brew "fish" +brew "fzf" +brew "pfetch" +brew "sesh" +brew "starship" +brew "gyoder/graceful-tap/jj-starship" +brew "tmux" +brew "zoxide" + +# Editor Stuff +brew "gyoder/graceful-tap/neovim-nightly" +brew "neovim", link: false # Just in case :) +brew "tree-sitter" +brew "tree-sitter-cli" + +# Language Servers +brew "codebook-lsp" +go "golang.org/x/tools/gopls" +brew "tinymist" +brew "zls" + +# Git Stuff +brew "gh" +brew "jj" + + + +brew "tailscale" +brew "sqlite" +brew "asciinema" + +# CLI Utils +brew "ripgrep" +brew "dust" +brew "tree" +brew "stow" diff --git a/fish/.config/fish/conf.d/rustup.fish b/fish/.config/fish/conf.d/rustup.fish deleted file mode 100644 index e4cb363..0000000 --- a/fish/.config/fish/conf.d/rustup.fish +++ /dev/null @@ -1 +0,0 @@ -source "$HOME/.cargo/env.fish" diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 6ac42b7..277c368 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -43,20 +43,25 @@ else if test "$host" = "lovelace" else if test "$host" = "lee" fish_add_path ~/.local/bin end + +source "$HOME/.cargo/env.fish" 2>/dev/null + +set -gx HOMEBREW_BUNDLE_FILE "~/.config/Brewfile" + if test -d /home/linuxbrew/.linuxbrew # Homebrew is installed on Linux set -gx HOMEBREW_PREFIX "/home/linuxbrew/.linuxbrew" set -gx HOMEBREW_CELLAR "/home/linuxbrew/.linuxbrew/Cellar" set -gx HOMEBREW_REPOSITORY "/home/linuxbrew/.linuxbrew/Homebrew" - set -gx PATH "/home/linuxbrew/.linuxbrew/bin" "/home/linuxbrew/.linuxbrew/sbin" $PATH + set -gx PATH "/home/linuxbrew/.linuxbrew/bin" "/home/linuxbrew/.linuxbrew/sbin" "/home/linuxbrew/.linuxbrew/opt/rustup/bin" $PATH set -q MANPATH; or set MANPATH '' set -gx MANPATH "/home/linuxbrew/.linuxbrew/share/man" $MANPATH set -q INFOPATH; or set INFOPATH '' set -gx INFOPATH "/home/linuxbrew/.linuxbrew/share/info" $INFOPATH - # Homebrew asked for this in order to `brew upgrade` - set -gx HOMEBREW_GITHUB_API_TOKEN {api token goes here, don't remember where that's created} + + end if status is-interactive diff --git a/fish/.config/starship.toml b/fish/.config/starship.toml index 3587f05..103c6c5 100644 --- a/fish/.config/starship.toml +++ b/fish/.config/starship.toml @@ -98,7 +98,7 @@ git status --porcelain | awk ' } ' ''' -when = 'test -d .git && ! test -d .jj' +when = 'git rev-parse --is-inside-work-tree 2>/dev/null && ! jj root 2>/dev/null' shell = ["sh"] format = "[](fg:overlay)[[ $output ](bg:overlay)]($style)[](fg:overlay) " style = "bg:overlay fg:love" diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua index c9d5a42..21cd978 100644 --- a/vim/.config/nvim/init.lua +++ b/vim/.config/nvim/init.lua @@ -149,12 +149,5 @@ if vim.env.TMUX ~= nil then } end - -if vim.treesitter.language.ft_to_lang == nil then - vim.treesitter.language.ft_to_lang = function(ft) - return ft - end -end - -- https://simondalvai.org/blog/godot-neovim/ require("godot") diff --git a/vim/.config/nvim/lsp/codebook.lua b/vim/.config/nvim/lsp/codebook.lua new file mode 100644 index 0000000..5bd3696 --- /dev/null +++ b/vim/.config/nvim/lsp/codebook.lua @@ -0,0 +1,40 @@ +---@brief +--- +--- https://github.com/blopker/codebook +--- +--- An unholy spell checker for code. +--- +--- `codebook-lsp` can be installed by following the instructions [here](https://github.com/blopker/codebook/blob/main/README.md#installation). +--- +--- The default `cmd` assumes that the `codebook-lsp` binary can be found in `$PATH`. +--- + +---@type vim.lsp.Config +return { + cmd = { 'codebook-lsp', 'serve' }, + filetypes = { + 'c', + 'css', + 'gitcommit', + 'go', + 'haskell', + 'html', + 'java', + 'javascript', + 'javascriptreact', + 'lua', + 'markdown', + 'php', + 'python', + 'ruby', + 'rust', + 'swift', + 'toml', + 'text', + 'typescript', + 'typescriptreact', + 'typst', + 'zig', + }, + root_markers = { '.git', 'codebook.toml', '.codebook.toml' }, +} diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua index ea0434d..38fdacd 100644 --- a/vim/.config/nvim/lua/native-lsp.lua +++ b/vim/.config/nvim/lua/native-lsp.lua @@ -78,6 +78,7 @@ vim.lsp.config('csharp-ls', { vim.lsp.enable("csharp-ls") vim.lsp.enable("asm-lsp") +vim.lsp.enable("codebook") -- https://lsp-zero.netlify.app/blog/lsp-client-features.html diff --git a/vim/.config/nvim/lua/plugins/init.lua b/vim/.config/nvim/lua/plugins/init.lua index aeebde4..574aaf0 100644 --- a/vim/.config/nvim/lua/plugins/init.lua +++ b/vim/.config/nvim/lua/plugins/init.lua @@ -32,14 +32,56 @@ return require('packer').startup(function(use) } use { 'nvim-telescope/telescope.nvim', - requires = { { 'nvim-lua/plenary.nvim' } } + requires = { { 'nvim-lua/plenary.nvim' } }, + run = ":TSUpdate", + config = function() + require('telescope').setup({ + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--smart-case", + "--glob=!node_modules/**", + "--glob=!build/**", + }, + file_ignore_patterns = { "node_modules", "build" }, + }, + }) + end, } + use { 'nvim-treesitter/nvim-treesitter', - -- config = function() require("plugins/ts") end + branch = 'main', + run = ':TSUpdate', + config = function() + require('nvim-treesitter').setup() + + require('nvim-treesitter').install({ + 'c', 'lua', 'vim', 'vimdoc', 'query', 'markdown', 'markdown_inline', 'go' + }):wait() + + -- enable highlighting + vim.api.nvim_create_autocmd('FileType', { + callback = function(args) + local max_filesize = 100 * 1024 -- 100 KB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(args.buf)) + if ok and stats and stats.size > max_filesize then + return + end + pcall(vim.treesitter.start) + end, + }) + end } + + use 'mbbill/undotree' use 'mfussenegger/nvim-lint' use {