Compare commits
No commits in common. "080fe6528f5ba493ed33215c1f42cd92a741286f" and "9e596d625240fe6500992afe78380de10dc97675" have entirely different histories.
080fe6528f
...
9e596d6252
6 changed files with 50 additions and 38 deletions
|
|
@ -19,3 +19,6 @@ require('colorscheme')
|
||||||
-- Setup autocmd for metals - metals is a little weird and needs to load itself.
|
-- Setup autocmd for metals - metals is a little weird and needs to load itself.
|
||||||
-- The plugin that's loaded just makes metals code available in the first place.
|
-- The plugin that's loaded just makes metals code available in the first place.
|
||||||
require('plugins/metals')
|
require('plugins/metals')
|
||||||
|
|
||||||
|
-- Setup treesitter, select the configs to load, etc.
|
||||||
|
require('plugins/treesitter')
|
||||||
|
|
|
||||||
|
|
@ -53,13 +53,7 @@ map('n', 'gD', vim.lsp.buf.type_definition, { desc = 'Go To Type Definition' })
|
||||||
map('n', '<leader>cl', vim.lsp.codelens.run, { desc = 'Code Lens' })
|
map('n', '<leader>cl', vim.lsp.codelens.run, { desc = 'Code Lens' })
|
||||||
map('n', '<leader>rn', vim.lsp.buf.rename, { desc = 'Rename' })
|
map('n', '<leader>rn', vim.lsp.buf.rename, { desc = 'Rename' })
|
||||||
map('n', '<leader>ca', vim.lsp.buf.code_action, { desc = 'Code Action' })
|
map('n', '<leader>ca', vim.lsp.buf.code_action, { desc = 'Code Action' })
|
||||||
map('n', '[c', '<cmd>lua vim.diagnostic.jump({ count = -1, float = true })<CR>', { desc = 'prev diagnostic' })
|
map('n', '[c', '<cmd>lua vim.diagnostic.goto_prev({ wrap = false })<CR>', { desc = 'prev diagnostic' })
|
||||||
map('n', ']c', '<cmd>lua vim.diagnostic.jump({ count = 1, float = true })<CR>', { desc = 'next diagnostic' })
|
map('n', ']c', '<cmd>lua vim.diagnostic.goto_next({ wrap = false })<CR>', { desc = 'next diagnostic' })
|
||||||
map('n', '<leader>ls', ':Telescope lsp_document_symbols<CR>', { desc = 'Browse Document Symbols' })
|
map('n', '<leader>ls', ':Telescope lsp_document_symbols<CR>', { desc = 'Browse Document Symbols' })
|
||||||
map('n', '<leader>ld', ':Telescope lsp_dynamic_workspace_symbols<CR>', { desc = 'Browse Definitions' })
|
map('n', '<leader>ld', ':Telescope lsp_dynamic_workspace_symbols<CR>', { desc = 'Browse Definitions' })
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- Alignment
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
map('x', 'ga', '<Plug>(EasyAlign)', { desc = 'Easy Alignment' })
|
|
||||||
map('n', 'ga', '<Plug>(EasyAlign)', { desc = 'Easy Alignment' })
|
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,14 @@ require("lazy").setup({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Treesitter: Neovim bindings for the Tree-sitter parser generator tool and
|
||||||
|
-- incremental parsing library.
|
||||||
|
-- -------------------------------------------------------------------------
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate'
|
||||||
|
},
|
||||||
|
|
||||||
-- Neovim-native LSP Implementation
|
-- Neovim-native LSP Implementation
|
||||||
--
|
--
|
||||||
-- Some languages are supported elsewhere via plugins that know how to
|
-- Some languages are supported elsewhere via plugins that know how to
|
||||||
|
|
@ -341,8 +349,4 @@ require("lazy").setup({
|
||||||
-- i3 configuration syntax
|
-- i3 configuration syntax
|
||||||
-- -------------------------------------------------------------------------
|
-- -------------------------------------------------------------------------
|
||||||
'mboughaba/i3config.vim',
|
'mboughaba/i3config.vim',
|
||||||
|
|
||||||
-- Alignment support via `ga` in normal and visual selection mode.
|
|
||||||
-- -------------------------------------------------------------------------
|
|
||||||
'junegunn/vim-easy-align',
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
-- Note that Metals _does not use nvim-lspconfig_.
|
-- Note that Metals _does not use nvim-lspconfig_.
|
||||||
-- It still uses the nvim LSP, however.
|
-- It still uses the nvim LSP, however.
|
||||||
|
|
||||||
|
|
||||||
-- Autocmd that will actually be in charging of starting the whole thing
|
-- Autocmd that will actually be in charging of starting the whole thing
|
||||||
local nvim_metals_group = vim.api.nvim_create_augroup(
|
local nvim_metals_group = vim.api.nvim_create_augroup(
|
||||||
'nvim-metals',
|
'nvim-metals',
|
||||||
|
|
|
||||||
34
.config/nvim/lua/plugins/treesitter.lua
Normal file
34
.config/nvim/lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
-- One of "all", "maintained", or a list of languages
|
||||||
|
ensure_installed = {
|
||||||
|
"bash", "scala", "yaml", "css", "javascript", "lua", "hcl", "json",
|
||||||
|
"toml", "sql", "python", "gitcommit", "gitignore", "html"
|
||||||
|
},
|
||||||
|
|
||||||
|
-- This will be populated after load.
|
||||||
|
modules = {},
|
||||||
|
|
||||||
|
-- Only enable if CLI treesitter is installed.
|
||||||
|
auto_install = false,
|
||||||
|
|
||||||
|
-- Install languages synchronously (only applied to `ensure_installed`)
|
||||||
|
sync_install = false,
|
||||||
|
|
||||||
|
-- List of parsers to ignore installing
|
||||||
|
ignore_install = { },
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
disable = {},
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
|
||||||
|
indent = {
|
||||||
|
enable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
28
.zshrc
28
.zshrc
|
|
@ -37,9 +37,6 @@ export FZF_CTRL_R_OPTS="
|
||||||
--color header:italic
|
--color header:italic
|
||||||
--header 'Press CTRL-Y to copy command into clipboard'"
|
--header 'Press CTRL-Y to copy command into clipboard'"
|
||||||
|
|
||||||
# Enable ZSH Completion
|
|
||||||
autoload -Uz compinit && compinit
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Allow for menu-style tab completion.
|
# Allow for menu-style tab completion.
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
@ -150,28 +147,9 @@ else
|
||||||
echo $SSH_AGENT_PID > $ssh_agent_pid_file
|
echo $SSH_AGENT_PID > $ssh_agent_pid_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# Custom Functions
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# This function helps get back to the git root, which is really commonly useful
|
|
||||||
# when deep in a source directory. Aliased to `gr`.
|
|
||||||
function jump-to-git-root {
|
|
||||||
local git_root="$(git rev-parse --show-toplevel 2>/dev/null)"
|
|
||||||
if [[ -z $git_root ]]; then
|
|
||||||
>&2 echo 'Not a Git repo!'
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
local current_pwd=$(pwd)
|
|
||||||
OLDPWD=$current_pwd
|
|
||||||
cd $git_root
|
|
||||||
}
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Aliases
|
# Aliases
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
alias gr=jump-to-git-root
|
|
||||||
|
|
||||||
if command -v eza > /dev/null 2>&1; then
|
if command -v eza > /dev/null 2>&1; then
|
||||||
alias ls='eza'
|
alias ls='eza'
|
||||||
alias ll='eza -l'
|
alias ll='eza -l'
|
||||||
|
|
@ -221,11 +199,10 @@ fi
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
|
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
|
||||||
|
|
||||||
# This directory contains _git, a git completion script.
|
|
||||||
# We _also_ need the BASH one that is referenced above.
|
|
||||||
fpath=(~/.zsh $fpath)
|
fpath=(~/.zsh $fpath)
|
||||||
|
|
||||||
|
autoload -Uz compinit && compinit
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Initialize Starship
|
# Initialize Starship
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
@ -236,4 +213,3 @@ eval "$(starship init zsh)"
|
||||||
# This must be the last item in this file.
|
# This must be the last item in this file.
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
source $local_install_dir/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source $local_install_dir/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
eval "$(atuin init zsh)"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue