Compare commits

..

No commits in common. '0a7f70ba7410bc2f860107e587d0cfe74f97f37a' and '5742905cee2309da2bbb99d170db91e10874863a' have entirely different histories.

@ -17,8 +17,8 @@ setopt prompt_subst
zstyle ':vcs_info:git:*' formats '%b'
# prompt configs
# RPROMPT='${vcs_info_msg_0_}'
PROMPT='%F{#99ad6a}%~ %(1j.%F{#adadad}[%j]%f .)%F{#99ad6a}▷%f '
RPROMPT='${vcs_info_msg_0_}'
PROMPT='%F{green}%n@%m %~ ▷%f '
# history stuff
export HISTFILE=~/.zsh_history

@ -27,7 +27,7 @@ repo: https://github.com/yegappan/lsp
target: ~/.vim/pack/downloads/opt/lsp
[home vim]
when: host.has('vim')
when: host.has('vim') or host.has('nvim')
files:
vim/ftplugin > .vim/ftplugin
vim/plug.vim > .vim/autoload/plug.vim
@ -65,29 +65,30 @@ files:
when: host.has('vim')
cmd: vim +PlugInstall +qall
# [link-files neovim:windows]
# when: host.is_windows and host.has('nvim')
# target_root: ~/AppData/Local
# files:
# nvim/lua
# nvim/init.vim
[link-files neovim:windows]
when: host.is_windows and host.has('nvim')
target_root: ~/AppData/Local
files:
nvim/lua
nvim/init.vim
[home neovim:not-windows]
when: host.has('nvim') and not host.is_windows
[link-files neovim:linux]
when: host.is_linux and host.has('nvim')
target_root: ~/.config
files:
nvim/init.lua > .config/nvim/init.lua
nvim/lua > .config/nvim/lua
nvim/after > .config/nvim/after
nvim/colors
nvim/lua
nvim/init.vim
[git packer-posix]
when: not host.is_windows
repo: https://github.com/wbthomason/packer.nvim
target: ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# [git packer-windows]
# when: host.is_windows
# repo: https://github.com/wbthomason/packer.nvim
# target: ~/AppData/Local/nvim-data/site/pack/packer/start/packer.nvim
[git packer-windows]
when: host.is_windows
repo: https://github.com/wbthomason/packer.nvim
target: ~/AppData/Local/nvim-data/site/pack/packer/start/packer.nvim
[home cargo]
when: host.has('cargo')
@ -114,9 +115,9 @@ files: .screenrc
when: host.has('tmux')
files: .tmux.conf
# [home posix-nvim]
# when: host.has('nvim') and not host.is_windows
# files: nvim/init.vim > .config/nvim/init.vim
[home posix-nvim]
when: host.has('nvim') and not host.is_windows
files: nvim/init.vim > .config/nvim/init.vim
[home wsl]
when: host.is_wsl
@ -136,11 +137,9 @@ files: k9s/skin.yml > .config/k9s/skin.yml
crates:
just
cargo-watch
cargo-get
# this one requires libssl but we don't install that here so it doesn't
# always work
# this one isn't working on MacOS
# cargo-edit
cargo-get
[link-files gitui:linux]
when: host.is_linux and host.has('gitui')

@ -1422,7 +1422,7 @@ tab_bar_min_tabs 2
#: in the path are expanded. Changing this option by reloading the
#: config is not supported.
clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
#: Allow programs running in kitty to read and write from the
#: clipboard. You can control exactly which actions are allowed. The

@ -1 +0,0 @@
print("You are in Python")

@ -1,15 +0,0 @@
print("Setting up colors")
rose_pine = packer_plugins["rose-pine"]
if rose_pine then
print("Rose Pine is known")
if rose_pine.loaded then
print("Using Rose Pine colorscheme")
vim.cmd.colorscheme("rose-pine")
-- vim.cmd("colorscheme rose-pine")
else
print("Rose Pine is not loaded")
end
else
print("Rose Pine is not known")
end

@ -1,47 +0,0 @@
print("Configuring gitsigns")
local gitsigns = require('gitsigns')
gitsigns.setup {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
auto_attach = true,
attach_to_untracked = false,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
current_line_blame_formatter_opts = {
relative_time = false,
},
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
}

@ -1 +0,0 @@
print("LSP setting up")

@ -1,2 +0,0 @@
print("After Telescope")
local builtin = require('telescope.builtin')

@ -1,19 +0,0 @@
require("nvim-tree").setup({
git = { enable = false },
renderer = {
icons = {
show = {
folder_arrow = false
},
glyphs = {
default = "",
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
}
},
}
}
})

@ -1,63 +0,0 @@
print("Configuring Treesitter")
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = {
"c",
"c_sharp",
"cmake",
"cpp",
"css",
"diff",
"dockerfile",
"elixir",
"go",
"graphql",
"hcl",
"javascript",
"lua",
"nix",
"proto",
"python",
"query",
"ruby",
"rust",
"toml",
"typescript",
"vim",
"vimdoc",
"yaml",
"zig",
},
-- Install parsers asynchronously
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,
-- List of parsers to ignore installing (or "all")
ignore_install = { },
highlight = {
enable = true,
-- Disable treesitter on super large files
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- 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 = false,
},
}

@ -1,17 +0,0 @@
print("Init start")
-- set leader to space
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
-- for some reason vim-tree needs this to happen very early on and no I do not
-- know why
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("plugins")
require("prefs")
require("keys")

@ -1,12 +0,0 @@
print("Loading key mappings")
local telescope = require('telescope.builtin')
vim.keymap.set('n', '<C-p>', telescope.find_files, {})
-- vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
-- vim.keymap.set("v", "K", ":m '>-2<CR>gv=gv")
-- using J to join lines doesn't move your cursor
-- vim.keymap.set("n", "J", "mzJ`z")
-- vim.keymap.set('n', '<C-k'

@ -1,54 +1,17 @@
print("Loading plugins")
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- the plugin that manages the plugins
function packer_startup(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- this thing finds files or something
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
requires = {
{'nvim-lua/plenary.nvim'}
}
}
-- parses code
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
-- lets you look at parse trees
use { 'nvim-treesitter/playground' }
-- it's a colorscheme
use { "rose-pine/neovim", as = "rose-pine" }
-- hmmmm try this?
-- https://github.com/ThePrimeagen/harpoon/tree/harpoon2
-- visualizes vim's undo tree
use { "mbbill/undotree" }
-- a git client
use { "tpope/vim-fugitive" }
-- lsp manager
use 'neovim/nvim-lspconfig'
-- show git status per-line in a gutter column
use {
"lewis6991/gitsigns.nvim"
}
use {"akinsho/toggleterm.nvim", tag = "*", config = function()
require("toggleterm").setup()
end}
end
-- a file browser
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
use { "nvim-tree/nvim-tree.lua" }
require('packer').startup(packer_startup)
-- helps you configure lsp servers
use {
"neovim/nvim-lspconfig"
}
end)
require('lspconfig').rust_analyzer.setup({})
require("toggleterm").setup{}

@ -1,86 +0,0 @@
print("Applying Preferences")
-- The character coding used within vim. I don't remember why I set this, to be
-- honest.
vim.opt.encoding = "utf-8"
-- allow backspacing overl ine breaks
vim.opt.backspace = "indent,eol,start"
-- copy indent from current line when starting a new line
vim.opt.autoindent = true
-- automatically add an indent after block-opening symbols like {
vim.opt.smartindent = true
-- tab characters are 4
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
-- indent with 4 spaces when creating automatic indents
vim.opt.shiftwidth = 4
-- expand tab characters to spaces
vim.opt.expandtab = true
-- configure the characters used to show whitespace characters
vim.opt.listchars = {
tab = "",
trail = "·",
precedes = "",
extends = "",
}
-- show whitespace characters by default
vim.opt.list = true
-- perform searches incrementally
vim.opt.incsearch = true
-- use case-insensitive searching unless we see a capital
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- highlight recently searched term
vim.opt.hlsearch = true
-- line numbering on
vim.opt.nu = true
-- wrap long lines
vim.opt.wrap = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undoing"
vim.opt.undofile = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 4
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
-- Enable mouse mode
vim.opt.mouse = 'a'
-- do not show the mode, it is in the status line
vim.opt.showmode = false
-- use the operating system clipboard for the default yank register
-- vim.opt.clipboard = 'unnamedplus'
-- direction of new open splits
vim.opt.splitright = true
vim.opt.splitbelow = true
-- double-tap escape to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', {
desc = 'Exit terminal mode'
})
-- set the cwd of the buffer to the directory of the buffer's file
-- when entering a buffer.
vim.opt.autochdir = true

@ -1,17 +0,0 @@
function packer_startup(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- lsp manager
use 'neovim/nvim-lspconfig'
use {"akinsho/toggleterm.nvim", tag = "*", config = function()
require("toggleterm").setup()
end}
end
require('packer').startup(packer_startup)
require('lspconfig').rust_analyzer.setup({})
require("toggleterm").setup{}

@ -1,5 +1,4 @@
set expandtab
set shiftwidth=2
set tabstop=2
let b:ale_fix_on_save = 1
" set omnifunc=ale#completion#OmniFunc

@ -1,6 +1,4 @@
let b:rustfmt_autosave = 1
let b:ale_rust_cargo_use_clippy = 1
let b:ale_fix_on_save = 1
let g:rustfmt_autosave = 1
nmap <F5> :Cargo run<CR>
nmap <F7> :Cargo check<CR>

18
vimrc

@ -10,9 +10,6 @@ if has('nvim') && has('win32')
endif
call plug#begin()
if !has('nvim')
Plug 'dense-analysis/ale' " just for linting this time around
endif
Plug 'tpope/vim-fugitive' " integration with the git cli
Plug 'tpope/vim-surround' " edits surrounding quotes and parens and the like
Plug 'tpope/vim-rails' " rails project management stuff
@ -25,7 +22,6 @@ call plug#begin()
Plug 'fatih/vim-hclfmt' " nicely formats hcl files
Plug 'nanotech/jellybeans.vim' " the best colorscheme
Plug 'ervandew/supertab' " makes tab better apparently
Plug 'NoahTheDuke/vim-just' " justfiles
Plug 'scrooloose/nerdcommenter' " no idea if I'm even using this
Plug 'ctrlpvim/ctrlp.vim' " don't actually know how to use this honestly
Plug 'itchyny/lightline.vim' " fancy status line
@ -537,16 +533,10 @@ nmap <S-M> :LspDiagCurrent<CR>
" ALE -----------------------------------------------------------------------{{{
if !has('nvim')
let g:ale_linters = {
\ 'rust': ['analyzer'],
\ 'python': ['ruff']
\ }
let g:ale_fixers = {
\ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'],
\ 'python': ['ruff_format', 'reorder-python-imports']
\ }
" we're not using ALE for Autocomplete because we're using lsp instead
let g:ale_completion_enabled = 0
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_fixers = {'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines']}
let g:ale_rust_cargo_use_clippy = 1
let g:ale_completion_enabled = 1
set completeopt=menu,menuone,preview,noselect,noinsert
endif
" ---------------------------------------------------------------------------}}}

Loading…
Cancel
Save