From 8eb01590c31051a12f762bc7a642f4960a904f95 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 5 Jul 2025 10:11:31 +0200 Subject: [PATCH] feat(readme): correctness changes --- .config/nvim/after/ftplugin/fish.lua | 1 + .config/nvim/lsp/bashls.lua | 4 ++ .config/nvim/lsp/fish_ls.lua | 4 ++ README.md | 60 ++++++++++++++-------------- prestow.fish | 5 +++ 5 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 .config/nvim/after/ftplugin/fish.lua create mode 100644 .config/nvim/lsp/bashls.lua create mode 100644 .config/nvim/lsp/fish_ls.lua create mode 100755 prestow.fish diff --git a/.config/nvim/after/ftplugin/fish.lua b/.config/nvim/after/ftplugin/fish.lua new file mode 100644 index 0000000..1b8d5ec --- /dev/null +++ b/.config/nvim/after/ftplugin/fish.lua @@ -0,0 +1 @@ +vim.lsp.enable('fish_ls') diff --git a/.config/nvim/lsp/bashls.lua b/.config/nvim/lsp/bashls.lua new file mode 100644 index 0000000..9b9ed9a --- /dev/null +++ b/.config/nvim/lsp/bashls.lua @@ -0,0 +1,4 @@ +return { + cmd = { 'bash-language-server', 'start' }, + filetypes = { 'sh', 'bash' }, +} diff --git a/.config/nvim/lsp/fish_ls.lua b/.config/nvim/lsp/fish_ls.lua new file mode 100644 index 0000000..3c2541a --- /dev/null +++ b/.config/nvim/lsp/fish_ls.lua @@ -0,0 +1,4 @@ +return { + cmd = { 'fish-lsp', 'start' }, + filetypes = { 'fish' }, +} diff --git a/README.md b/README.md index 626e7ed..a24bee3 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,47 @@ - +# antonw51's dotfiles -# Anton's dotfiles +These are my personal configuration files as I use for Arch, i3, Neovim, Fish +shell, and more. There are various prerequsites required for this but those +won't be listed. -These are my dotfiles for zsh, i3, neovim, and kitty. All stored using the GNU stow applet. +## Stow -To install these dotfiles and use them as your own, simply install GNU stow: +To make it as easy as possible to install these configuration files, it is +recommended that you use GNU Stow, which is a simple utility that links your files +upwards. To use it, install `stow` from your package manager (like `pacman`): ```bash $ sudo pacman -S stow ``` -clone this repository to your home directory: +Clone this repository to a convenient spot: ```bash -$ git clone --depth=1 https://github.com/antonw51/dotfiles ~/dotfiles +$ git clone --depth=1 https://github.com/antonw51/dotfiles ~/.dotfiles +$ cd ~/.dotfiles ``` -then use the `stow` command: +> [!IMPORTANT] +> Before stowing, it is recommended to run the `prestow.fish` script so that +> `stow` doesn't link directories such as your entire `.config` folder to +> this directory, instead only files. +> +> This simple script will create empty (unlinked) directories where stow +> expects to force it into linking files only. Remember that any changes made +> even to your home configratuion will be reflected in this repo after linking: +> +> ```bash +> $ ./prestow.fish +> ``` + +Then finally to link all of the necessary configs, run `stow` as such: ```bash -$ stow ~/dotfiles +$ stow . ``` -## Oh-my-zsh - -The zsh config present here relies on oh-my-zsh, you can install that with curl: - -```bash -$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -``` - -Then install the dependencies: - -- zsh-syntax-highlighting: - -```bash -$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting -``` - -- zsh-completion: - -```bash -$ git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions -``` +> [!NOTE] +> Stow will have problems if you already have any conflicting configuration +> files as found here. Currently the easiest solution to this is to remove your +> pre-existing files. Alternatively you can use the `--adopt` option with stow, +> and then reset this repository to its previous state using `git`. diff --git a/prestow.fish b/prestow.fish new file mode 100755 index 0000000..5b3fdce --- /dev/null +++ b/prestow.fish @@ -0,0 +1,5 @@ +#!/usr/bin/fish + +for path in **/ + mkdir ../$path -p +end