Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles 🚀

Personal Neovim and tmux configuration.

iTerm2 screenshot Neovim screenshot

NOTE: these dotfiles are meant primarily as inspiration. Don't use them blindly — read what they do before copying them.


Table of Contents


Repository structure

.
├── .config
│   ├── nvim
│   │   ├── init.lua                 # entry point: disables netrw, loads davide.config
│   │   ├── lazy-lock.json           # plugin lockfile (pinned commits)
│   │   └── lua/davide
│   │       ├── config/              # options, keymaps, autocommands, lazy.nvim bootstrap
│   │       └── plugins/
│   │           ├── ui/              # colorscheme, statusline, breadcrumbs, notifications
│   │           ├── coding/          # treesitter, git, pairs, copilot
│   │           ├── utils/           # pickers, file tree, sessions, telescope, etc.
│   │           ├── lsp_completion/  # mason, lspconfig, blink.cmp, conform, snippets
│   │           └── core/            # shared Lua helper functions
│   └── tmux
│       ├── tmux.conf                # main config + theme + TPM plugins
│       ├── tmux.reset.conf          # full key remapping
│       └── scripts/cal.sh           # calendar widget (icalBuddy) for the status bar
└── images/

Requirements

Requirement Notes
Neovim ≥ 0.11 needed for the vim.lsp.config / vim.lsp.enable APIs used in the config
True-color terminal WezTerm or iTerm2
Nerd Font Meslo Nerd Font is used here
ripgrep search backend for Telescope and the Snacks picker
fd file search
Node.js ≥ 22 required by the JS/TS language servers
lazygit Git integration inside Neovim
gh required by octo.nvim
tmux ≥ 3.3 for display-popup and the options used here
XCode Command Line Tools to build telescope-fzf-native (make)
latexmk + Skim optional, VimTeX only
icalBuddy optional, cal.sh only

Command-line tools used in this workflow

fzf · fd · fzf-git · bat · delta · eza · tldr · zoxide (used by tmux-sessionx)

Installing the requirements on macOS

brew install neovim ripgrep fd fzf bat git-delta eza lazygit gh tmux zoxide
brew install --cask wezterm font-meslo-lg-nerd-font
xcode-select --install

Installation

git clone git@github.com:davidedantonio/dotfiles.git
cd dotfiles

# Neovim
cp -r .config/nvim ~/.config/nvim

# tmux
cp -r .config/tmux ~/.config/tmux

# TPM (tmux plugin manager)
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

On the first nvim launch, lazy.nvim bootstraps itself and pulls the plugins; Mason then installs language servers, formatters and linters in the background (after a 3-second delay). If you open a file and see an error about a server failing to start, that's expected — Mason hasn't finished yet. Press enter and wait.

For tmux, start a session and hit Ctrl+A then I (uppercase) to have TPM install the plugins.


Neovim

Config layout

init.lua disables netrw and loads lua/davide/config/init.lua, which in turn requires:

File Contents
config/keymaps.lua all global key mappings (leader = Space)
config/lazy.lua lazy.nvim bootstrap and plugin directory imports
config/options.lua Vim options
config/highlights.lua highlight group overrides
config/autocommands.lua autocommands
config/custom_functions.lua custom helpers (e.g. OpenFile(), ToggleConcealLevel())
config/lsp_diagnostic.lua diagnostics look and behaviour

The directories imported by lazy.nvim are plugins/ui, plugins/coding, plugins/utils and plugins/lsp_completion. plugins/core is not a plugin module — it only holds shared Lua helpers.


Neovim plugins

Plugin manager

Plugin Description
folke/lazy.nvim plugin manager, with a lockfile in lazy-lock.json and automatic update checks

Shared dependencies

Plugin Description
nvim-lua/plenary.nvim Lua utility library used by many plugins
nvim-tree/nvim-web-devicons file and filetype icons
MunifTanjim/nui.nvim UI components (used by neo-tree and noice)

UI — plugins/ui/

Plugin Description
folke/tokyonight.nvim colorscheme (storm style) with a custom coolnight palette on a #011323 background
nvim-lualine/lualine.nvim global statusline (laststatus=3) with branch, diff, diagnostics, filesize and LSP status
utilyre/barbecue.nvim winbar breadcrumbs with code context
SmiteshP/nvim-navic current symbol context via LSP (barbecue dependency)
folke/noice.nvim replaces cmdline, messages and popupmenu — command palette on, scrollbars off

Coding — plugins/coding/

Plugin Description
nvim-treesitter/nvim-treesitter parsing and highlighting (main branch); parsers installed for JS/TS/TSX, Lua, Python, C/C++, Java, HTML, CSS, JSON, YAML, Markdown, Bash, Docker, GraphQL, Prisma, Svelte, Vim
windwp/nvim-ts-autotag auto-close and auto-rename HTML/JSX/Vue/PHP tags
echasnovski/mini.pairs auto-close brackets and quotes
lewis6991/gitsigns.nvim Git signs in the gutter, line blame and hunk actions (<leader>g…)
kdheepak/lazygit.nvim lazygit in a floating window, opened at the repo root (<leader>lg)
github/copilot.vim GitHub Copilot, enabled at startup

Utilities — plugins/utils/

Plugin Description
folke/snacks.nvim the main suite: dashboard, picker, notifier, indent guides, zen mode, dim, bufdelete, bigfile
nvim-neo-tree/neo-tree.nvim side file explorer (<leader>ee, <leader>ef)
saifulapm/neotree-file-nesting-config file nesting rules for neo-tree
nvim-telescope/telescope.nvim fuzzy finder (kept alongside the Snacks picker)
nvim-telescope/telescope-fzf-native.nvim native C sorter for Telescope (requires make)
folke/trouble.nvim readable list of diagnostics, quickfix, loclist and todos (<leader>x…)
folke/todo-comments.nvim highlights and searches TODO/FIXME/HACK/BUG
folke/which-key.nvim key hints, with groups defined for every leader prefix
rmagatti/auto-session session save and restore (<leader>s…); autosave off by default
pwntester/octo.nvim GitHub issues, PRs, discussions and notifications from inside Neovim (<leader>o…)
kylechui/nvim-surround manipulate surroundings with ys, ds, cs
gbprod/substitute.nvim replace with register contents via s / ss / S
HiPhish/rainbow-delimiters.nvim brackets colored by nesting level
NvChad/nvim-colorizer.lua inline color previews, with Tailwind class support
andrewferrier/wrapping.nvim automatic soft/hard wrap switching based on filetype
lervag/vimtex LaTeX support (latexmk compiler, Skim viewer)

utils/markdown_preview.lua is currently an empty file (return {}): no Markdown preview plugin is active.

LSP, completion and formatting — plugins/lsp_completion/

Plugin Description
williamboman/mason.nvim installs language servers, formatters, linters and debug adapters
mason-org/mason-lspconfig.nvim bridge between Mason and nvim-lspconfig, with automatic server enabling
WhoIsSethDaniel/mason-tool-installer.nvim installs and updates tools automatically on startup
neovim/nvim-lspconfig base LSP server configurations
saghen/blink.cmp completion engine (replaces nvim-cmp); sources: lazydev, LSP, path, snippets, buffer
L3MON4D3/LuaSnip snippet engine, with autosnippets enabled
rafamadriz/friendly-snippets snippet collection for many languages
folke/lazydev.nvim completion and types for the Neovim Lua API
stevearc/conform.nvim formatting, including on save (<leader>Fm to format manually)

Language servers, formatters and linters

Installed automatically by mason-tool-installer (auto-update on, with a 5-hour debounce):

Language servers: bash-language-server, lua-language-server, vim-language-server, html-lsp, emmet-ls, css-lsp, json-lsp, typescript-language-server, eslint-lsp, tailwindcss-language-server, pyright, clangd

Formatters and linters: stylua, prettier, biome, black, autopep8, clang-format, editorconfig-checker

Debug adapters: js-debug-adapter, codelldb

The servers configured explicitly in mason_lspconfig.lua are lua_ls, ts_ls, eslint, biome, emmet_ls, cssls, html, tailwindcss, pyright and clangd.

Formatting

Rules live in conform.nvim, with format on save enabled (2s timeout, LSP fallback):

Language Formatter
JavaScript / TypeScript (+ React) biome-organize-importsbiome
JSON / JSONC / CSS biome
HTML / YAML / Markdown / GraphQL / Svelte / Liquid prettier
Lua stylua
Python isortblack

Custom snippets

In plugins/lsp_completion/snippets/:

File Snippets
ts_js.lua req (require), tych (try/catch), rex (express), exrout (express Router), dotenv
reactjs.lua compo (React component), rimg, rinput, rhr, rbr
cpp.lua cfor (for loop), boil (main boilerplate)
markdown.lua do (todo checkbox)

tmux

Prefix remapped to Ctrl+A. TokyoNight-style theme matching Neovim, windows indexed from 1, automatic renumbering, system clipboard and vi copy mode.

tmux plugins

Managed by TPM (~/.tmux/plugins/tpm):

Plugin Description
tmux-plugins/tpm plugin manager
tmux-plugins/tmux-sensible sensible default settings
christoomey/vim-tmux-navigator seamless navigation between tmux panes and Neovim splits
tmux-plugins/tmux-yank copy to the system clipboard
tmux-plugins/tmux-continuum automatic session save and restore (@continuum-restore on)
fcsonline/tmux-thumbs quick copy of on-screen strings via hints
sainnhe/tmux-fzf manage sessions, windows and panes through fzf
wfxr/tmux-fzf-url extract and open visible URLs with fzf (2000-entry history)
omerxx/tmux-sessionx session switcher with zoxide integration — prefix + o
omerxx/tmux-floax floating 80×80% pane — prefix + p

The status bar also has support wired up for tmux-prefix-highlight through #{prefix_highlight}: add the plugin to the list if you want to see it in action.

Scripts

scripts/cal.sh — reads the macOS calendar through icalBuddy and shows the next event in the status bar, with a popup warning shortly before it starts. Requires icalBuddy and is not hooked into the status bar by default.

Key bindings

Defined in tmux.reset.conf (prefix = Ctrl+A):

Key Action
v / s vertical / horizontal split in the current directory
h j k l move focus between panes
, . - = resize pane (left / right / down / up)
z zoom pane
c kill pane
x swap panes
H / L previous / next window
Ctrl+A last window
Ctrl+C new window in $HOME
w / Ctrl+W list windows
S choose session
r rename window
R reload tmux.conf
K clear the terminal
* synchronize panes
P toggle pane border status
Ctrl+D detach
Ctrl+X lock server
o tmux-sessionx
p floating pane (floax)
I install plugins (TPM)

In copy mode, v starts the selection (Vim style).


Neovim ↔ tmux integration

vim-tmux-navigator is installed on the tmux side. In Neovim, Ctrl+h/j/k/l are currently mapped to the native <C-w>h/j/k/l commands in keymaps.lua: they move focus between Neovim splits but don't cross over into tmux panes.

To get seamless navigation across both, add the plugin on the Neovim side too and drop those four manual mappings:

-- lua/davide/plugins/utils/tmux_navigator.lua
return {
  "christoomey/vim-tmux-navigator",
  lazy = false,
}

License

Personal use. Feel free to take whatever is useful to you.

About

Personal configuration for nvim and tmux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages