Skip to content

alanhamlett/dotfiles

Repository files navigation

Alan's Dotfiles

NeoVim configuration for TypeScript, Go, and Python development.

Installation

brew install neovim
./install.sh

On first launch, lazy.nvim will auto-bootstrap and install all plugins. Then install the LSP servers and linters:

:MasonInstall ruff eslint golangci-lint

Key Features

  • Kanagawa color scheme with transparent background
  • Buffer tabs at the top via bufferline.nvim
  • LSP support for TypeScript, Go, and Python via mason + lspconfig
  • Async linting while you type via nvim-lint (ruff, eslint, golangci-lint)
  • Autocompletion with Tab via nvim-cmp
  • Treesitter for syntax highlighting
  • Common swp, backup, & view directories (no more ~ files left around)
  • Useful defaults (spaces instead of tabs, remove trailing whitespace, etc.)

Plugins

Key Bindings

Key Action
Ctrl-f Fuzzy file finder (telescope)
Ctrl-t Toggle file tree
Ctrl-g Go to definition (LSP)
Ctrl-n / Ctrl-p Next / previous buffer tab
Ctrl-d Close current buffer
Ctrl-h/j/k/l Navigate between split windows
K Hover documentation (LSP)
gr Find references (LSP)
\rn Rename symbol (LSP)
\ca Code actions (LSP)
\e Show diagnostic under cursor in a float
[d / ]d Previous / next diagnostic
,w ,b ,e CamelCase word motions
Space Open fold and center line
f0-f9 Set fold level

Git Blame

Run :BlameToggle to open the blame view next to the buffer. Inside the blame window:

Key Action
Tab Step back in history (file state before commit)
Backspace Step forward in history
y Copy the commit hash
o Open the commit on GitHub in the browser

Diagnostics

Errors and warnings appear in two ways:

  • While editing -- inline virtual text at the end of each line shows the diagnostic message
  • On save -- a location list opens at the bottom with the full list of errors; focus stays in your file. The list auto-closes when all errors are resolved.

Additional keybindings for diagnostics:

Key Action
\e Show full diagnostic in a floating popup
[d / ]d Jump to previous / next diagnostic

Deprecation notes from LSP servers (e.g. pyright's datetime.utcnow warning) are filtered globally. To suppress other warnings on a single line, use the linter's inline directive:

Tool Inline directive
flake8 / pycodestyle / ruff # noqa: E402 (or # noqa for all codes)
pyright / basedpyright # pyright: ignore[reportXxx] or # type: ignore
mypy # type: ignore[code]
eslint // eslint-disable-line rule-name
typescript (tsc) // @ts-expect-error (on the line above)

Font

Use a font patched for powerline compatibility, like Anonymous Pro.

Full list of patched fonts

About

install my NeoVim config by pasting some Terminal commands

Topics

Resources

Stars

Watchers

Forks

Contributors