Compare commits
4 Commits
nvim.pack
...
66828167e6
| Author | SHA1 | Date | |
|---|---|---|---|
| 66828167e6 | |||
| 1ab9eceb0d | |||
| bdffc2821b | |||
| fee227e2ae |
21
Makefile
21
Makefile
@@ -1,26 +1,15 @@
|
|||||||
|
# prefer this if stow is available
|
||||||
|
.PHONY: stow
|
||||||
stow:
|
stow:
|
||||||
stow nvim
|
stow nvim
|
||||||
|
|
||||||
# stow-server:
|
|
||||||
# stow default zsh-server lazygit albert tmux neovim ranger
|
|
||||||
|
|
||||||
# rm:
|
|
||||||
# rm ~/.zshrc ~/.p10k.zsh ~/.tmux.conf ~/.docker_aliases ~/.config/albert/albert.conf ~/.config/nvim/init.vim ~/.config/ranger/rc.conf ~/.config/kitty/kitty.conf
|
|
||||||
# echo "this might delete files from this repository also"
|
|
||||||
|
|
||||||
# link-root:
|
|
||||||
# sudo rm -rf /root/.oh-my-zsh /root/.zshrc /root/.p10k.zsh /root/.docker_aliases
|
|
||||||
# sudo ln -s ${HOME}/.oh-my-zsh /root/
|
|
||||||
# sudo ln -s ${HOME}/.zshrc /root/
|
|
||||||
# sudo ln -s ${HOME}/.p10k.zsh /root/
|
|
||||||
# sudo ln -s ${HOME}/.docker_aliases /root/
|
|
||||||
|
|
||||||
LN := ln -svf
|
LN := ln -svf
|
||||||
LNDIR := ln -sv
|
LNDIR := ln -sv
|
||||||
|
|
||||||
DOTFILES_DIR := $(shell pwd)
|
DOTFILES_DIR := $(shell pwd)
|
||||||
TARGET_DIR := $(HOME)
|
TARGET_DIR := $(HOME)
|
||||||
|
|
||||||
|
# if stow is not available, symlink configs instead
|
||||||
.PHONY: link
|
.PHONY: link
|
||||||
link: nvim
|
link: nvim
|
||||||
|
|
||||||
@@ -33,7 +22,3 @@ nvim:
|
|||||||
git:
|
git:
|
||||||
rm -f $(TARGET_DIR)/.gitconfig
|
rm -f $(TARGET_DIR)/.gitconfig
|
||||||
$(LN) $(DOTFILES_DIR)/git/.gitconfig $(TARGET_DIR)/.gitconfig
|
$(LN) $(DOTFILES_DIR)/git/.gitconfig $(TARGET_DIR)/.gitconfig
|
||||||
|
|
||||||
# zsh:
|
|
||||||
# $(LN) ./zsh/.zshrc ~/.zshrc
|
|
||||||
# $(LN) ./zsh/.zprofile ~/.zprofile
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
[Insipiration](https://github.com/Racle/dotfiles/tree/master)
|
[Insipiration](https://github.com/Racle/dotfiles/tree/master)
|
||||||
|
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
Run `make stow`
|
Run `make stow`
|
||||||
|
|||||||
6
aliases
6
aliases
@@ -2,6 +2,7 @@ cc-clean(){
|
|||||||
rm -rf ./**/*.out 2>/dev/null
|
rm -rf ./**/*.out 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# compile and run a single C program. Useful for prototyping.
|
||||||
cc-run(){
|
cc-run(){
|
||||||
local file
|
local file
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
@@ -12,11 +13,6 @@ cc-run(){
|
|||||||
file="$1"
|
file="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
#if command -v norminette &>/dev/null
|
|
||||||
#then
|
|
||||||
# norminette "${file}" -R CheckForbiddenSourceHeader
|
|
||||||
#fi
|
|
||||||
|
|
||||||
gcc "${file}" -o "${file}.out" -Wall -Wextra -Werror -g3 -fsanitize=address $@ && \
|
gcc "${file}" -o "${file}.out" -Wall -Wextra -Werror -g3 -fsanitize=address $@ && \
|
||||||
"./${file}.out"
|
"./${file}.out"
|
||||||
|
|
||||||
|
|||||||
1
install-ghostty-ubuntu.sh
Executable file
1
install-ghostty-ubuntu.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mkasberg/ghostty-ubuntu/HEAD/install.sh)"
|
||||||
@@ -6,31 +6,7 @@ Inspirations:
|
|||||||
|
|
||||||
# Neovim Notes
|
# Neovim Notes
|
||||||
|
|
||||||
## Splits
|
See custom keymaps with short descriptions with `<leader><leader>h`.
|
||||||
|
|
||||||
Horizontal split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:sp
|
|
||||||
```
|
|
||||||
|
|
||||||
Vertical split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:vs
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a file in a horizontal split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:sp path/to/file
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a file in a vertical split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:vs path/to/file
|
|
||||||
```
|
|
||||||
|
|
||||||
Split shortcuts:
|
Split shortcuts:
|
||||||
|
|
||||||
@@ -53,12 +29,6 @@ Buffer shortcuts:
|
|||||||
- `<leader>bn` next buffer
|
- `<leader>bn` next buffer
|
||||||
- `<leader>bd` delete the current buffer
|
- `<leader>bd` delete the current buffer
|
||||||
|
|
||||||
Browse files with:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
<leader>dl
|
|
||||||
```
|
|
||||||
|
|
||||||
Telescope shortcuts:
|
Telescope shortcuts:
|
||||||
|
|
||||||
- `<leader>ff` find files
|
- `<leader>ff` find files
|
||||||
@@ -68,22 +38,13 @@ Telescope shortcuts:
|
|||||||
|
|
||||||
Oil usage:
|
Oil usage:
|
||||||
|
|
||||||
- `<leader>dl` opens the parent directory of the current file
|
- `<leader>dl` opens the file browser
|
||||||
- `<CR>` opens a file or enters a directory
|
- `<CR>` opens a file or enters a directory
|
||||||
- `-` goes to the parent directory
|
- `-` goes to the parent directory
|
||||||
- `<BS>` also goes to the parent directory
|
- `<BS>` also goes to the parent directory
|
||||||
- `<A-h>` also goes to the parent directory
|
- `<A-h>` also goes to the parent directory
|
||||||
- `<A-l>` opens the selected file or enters the selected directory
|
- `<A-l>` opens the selected file or enters the selected directory
|
||||||
- `<C-p>` previews the selected entry in a right-hand vertical split
|
- `<C-p>` previews the selected entry
|
||||||
- edit the Oil buffer, then `:w` to apply file operations
|
|
||||||
- hidden files are shown, but `.git` stays hidden
|
|
||||||
|
|
||||||
Open `netrw` explicitly with:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
<leader>nl
|
|
||||||
:Ex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Window Navigation
|
## Window Navigation
|
||||||
|
|
||||||
@@ -104,31 +65,12 @@ Cycle through windows:
|
|||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
|
||||||
Open a terminal in the current window:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:term
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a terminal in a horizontal split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:sp | term
|
|
||||||
```
|
|
||||||
|
|
||||||
Open a terminal in a vertical split:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
:vs | term
|
|
||||||
```
|
|
||||||
|
|
||||||
Leave terminal mode and return to normal mode:
|
Leave terminal mode and return to normal mode:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
<Esc>
|
<Esc>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## LSP
|
## LSP
|
||||||
|
|
||||||
When an LSP server is attached to the current buffer:
|
When an LSP server is attached to the current buffer:
|
||||||
@@ -143,22 +85,15 @@ Diagnostics:
|
|||||||
|
|
||||||
- `g.` open diagnostic float
|
- `g.` open diagnostic float
|
||||||
- `gl` send diagnostics to the location list
|
- `gl` send diagnostics to the location list
|
||||||
|
- `gle` display error information
|
||||||
|
- `gie` toggle inline errors
|
||||||
|
- `gve` toggle virtual line errors
|
||||||
- `g]` jump to next error
|
- `g]` jump to next error
|
||||||
- `g[` jump to previous error
|
- `g[` jump to previous error
|
||||||
|
|
||||||
|
|
||||||
## Tree-sitter
|
## Tree-sitter
|
||||||
|
|
||||||
Tree-sitter is managed with `nvim-treesitter` via `vim.pack`.
|
Tree-sitter is managed with `nvim-treesitter` via `vim.pack`. `tree-sitter-cli` and a C compiler is required to be installed.
|
||||||
|
|
||||||
Installing missing parsers requires the external tools from the upstream README:
|
|
||||||
|
|
||||||
- `tar`
|
|
||||||
- `curl`
|
|
||||||
- `tree-sitter-cli`
|
|
||||||
- a C compiler
|
|
||||||
|
|
||||||
If `tree-sitter` is on your `PATH`, startup will try to install the configured parsers if they are missing.
|
|
||||||
|
|
||||||
Useful commands:
|
Useful commands:
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ local function telescope_picker(picker)
|
|||||||
end
|
end
|
||||||
|
|
||||||
map("n", "<leader><leader>r", ":source ~/.config/nvim/init.lua<CR>", { desc = "reload init.lua" })
|
map("n", "<leader><leader>r", ":source ~/.config/nvim/init.lua<CR>", { desc = "reload init.lua" })
|
||||||
|
map("n", "<leader><leader>h", telescope_picker("keymaps"), { desc = "show keymaps" })
|
||||||
map("n", "<leader>dl", "<Cmd>Oil<CR>", { desc = "open oil" })
|
map("n", "<leader>dl", "<Cmd>Oil<CR>", { desc = "open oil" })
|
||||||
map("n", "<leader>ff", telescope_picker("find_files"), { desc = "find files" })
|
map("n", "<leader>ff", telescope_picker("find_files"), { desc = "find files" })
|
||||||
map("n", "<leader>fg", telescope_picker("live_grep"), { desc = "live grep" })
|
map("n", "<leader>fg", telescope_picker("live_grep"), { desc = "live grep" })
|
||||||
|
|||||||
Reference in New Issue
Block a user