Skip to content

💻 Configuration for a programming environment built around kitty and Neovim.

License

Notifications You must be signed in to change notification settings

dietrichm/dotfiles

Repository files navigation

💻 dotfiles

This repository contains configuration files and Lua code for my programming environment on Linux. The centrepieces of this environment are kitty running one Neovim instance and any number of zsh shells per project.

If you are looking for my Neovim config, you can find it in nvim/.config/nvim.

Dependencies

The following is required for installing and using these dotfiles:

  • Linux
  • git
  • zsh
  • make
  • Stow

Optional

fzf will be used when installed (i.e. using a package manager).

Depending on which config packages are installed, these dependencies are also required:

Installation

  • In the repo, execute git submodule update --init.
  • Edit ~/.zshenv to read export ZDOTDIR="$HOME/repos/dotfiles/zsh" (adapt directory).
  • Execute make in the repo to install all config packages.

Themes

Multiple themes are supported by installing specific config file variants for the desired theme. This way colours are configured for kitty, zsh, Neovim and fzf.

These files are also installed through make. Pass the theme name as an argument to make to install a specific one.

Currently, I only use and maintain one theme:

  • default

Config packages

The following (Stow based) config packages are available:

  • dig
  • direnv
  • git
  • helix
  • kitty
  • nvim
  • ranger
  • ssh
  • tig

Running make installs all of them. If you wish to only install specific packages, pass them as additional arguments (besides the theme name) to make, i.e.: make default ssh git.

Additionally, make all installs all config packages, which is useful when installing a specific theme along with all packages: make theme-name all.

Updating

Run nvim +PaqUpdate to update all plugins.

Language Servers (LSP)

Neovim's internal LSP client is used to provide code intelligence and completion using language servers.

gopls (for Go) is installed through the vim-go Neovim plugin (using :GoInstallBinaries).

Depending on the languages used, the following language server binaries need to be installed manually:

Switching servers

To disable current servers and start a single one, you can use :LspSwitch <name>.

This is especially useful for PHP, where only Intelephense is auto-started and you can switch to Phpactor using :LspSwitch phpactor. The command also avoids the stopped servers from spinning up again when new buffers are loaded.

Custom configuration

Some projects require or can benefit from some custom configuration for some of the tools used in this development set-up.

Neovim

Project local configuration can be set in .nvim.lua or .nvimrc.

zsh

Given direnv is installed, specific environment variables can be exported in .envrc files which are loaded automatically upon entering the (sub)directory.

git

A git/local.inc file can be used to set custom git configuration values. Here you can use conditional includes to set configuration per directory:

# vi: ft=gitconfig

[user]
	email = [email protected]
[includeIf "gitdir:~/foo/bar/"]
	path = ~/foo/bar/.gitconfig

universal-ctags

Aside from common global configuration options set in nvim/.config/ctags/global.ctags, additional project-level parameters can be defined within .ctags.d/*.ctags files. This allows to exclude i.e. compiled or vendor source files using more --exclude= options.

Linting source files

Lua files in this repository are linted using Luacheck and StyLua. You need to install these tools yourself.

To lint all Lua files, run make lint or make lint-lua.

License

Copyright 2021, Dietrich Moerman.

Released under the terms of the MIT License.

About

💻 Configuration for a programming environment built around kitty and Neovim.

Topics

Resources

License

Stars

Watchers

Forks