Compare commits
17 Commits
nvim.pack
...
dbcab8ada3
| Author | SHA1 | Date | |
|---|---|---|---|
| dbcab8ada3 | |||
| d66b0a8fb5 | |||
| cfe6ea12f7 | |||
| ba80d54a52 | |||
| f63bb12b4a | |||
| ebc9039915 | |||
| 88ed0146d2 | |||
| 3731c014f7 | |||
| 479ba02e79 | |||
| 00290628f8 | |||
| 60a602922e | |||
| 22981a59f6 | |||
| 05b83edc1a | |||
| 66828167e6 | |||
| 1ab9eceb0d | |||
| bdffc2821b | |||
| fee227e2ae |
30
Makefile
30
Makefile
@@ -1,19 +1,10 @@
|
|||||||
|
# prefer this if stow is available
|
||||||
|
.PHONY: stow unstow
|
||||||
stow:
|
stow:
|
||||||
stow nvim
|
stow nvim
|
||||||
|
|
||||||
# stow-server:
|
unstow:
|
||||||
# stow default zsh-server lazygit albert tmux neovim ranger
|
stow -D nvim
|
||||||
|
|
||||||
# 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
|
||||||
@@ -21,19 +12,22 @@ LNDIR := ln -sv
|
|||||||
DOTFILES_DIR := $(shell pwd)
|
DOTFILES_DIR := $(shell pwd)
|
||||||
TARGET_DIR := $(HOME)
|
TARGET_DIR := $(HOME)
|
||||||
|
|
||||||
.PHONY: link
|
# if stow is not available, symlink configs instead
|
||||||
|
.PHONY: link unlink
|
||||||
link: nvim
|
link: nvim
|
||||||
|
|
||||||
|
unlink: unnvim
|
||||||
|
|
||||||
.PHONY: nvim
|
.PHONY: nvim
|
||||||
nvim:
|
nvim:
|
||||||
rm -rf $(TARGET_DIR)/.config/nvim
|
rm -rf $(TARGET_DIR)/.config/nvim
|
||||||
$(LNDIR) $(DOTFILES_DIR)/nvim/.config/nvim $(TARGET_DIR)/.config/nvim
|
$(LNDIR) $(DOTFILES_DIR)/nvim/.config/nvim $(TARGET_DIR)/.config/nvim
|
||||||
|
|
||||||
|
.PHONY: unnvim
|
||||||
|
unnvim:
|
||||||
|
rm -rf $(TARGET_DIR)/.config/nvim
|
||||||
|
|
||||||
.PHONY: git
|
.PHONY: git
|
||||||
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"
|
||||||
|
|
||||||
|
|||||||
2
install-scripts/ghostty-fedora.sh
Executable file
2
install-scripts/ghostty-fedora.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
sudo dnf copr enable scottames/ghostty
|
||||||
|
sudo dnf install ghostty
|
||||||
1
install-scripts/ghostty-ubuntu.sh
Executable file
1
install-scripts/ghostty-ubuntu.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mkasberg/ghostty-ubuntu/HEAD/install.sh)"
|
||||||
@@ -3,34 +3,11 @@
|
|||||||
Inspirations:
|
Inspirations:
|
||||||
- [illya](https://codeberg.org/42nerds/nvim)
|
- [illya](https://codeberg.org/42nerds/nvim)
|
||||||
- [nolan](https://github.com/Hrumble/sneaky-nvim-config)
|
- [nolan](https://github.com/Hrumble/sneaky-nvim-config)
|
||||||
|
- [mats](https://github.com/BeerB34r/dotfiles)
|
||||||
|
|
||||||
# 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 +30,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 +39,14 @@ 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
|
- `go` opens the file in external viewer
|
||||||
- hidden files are shown, but `.git` stays hidden
|
|
||||||
|
|
||||||
Open `netrw` explicitly with:
|
|
||||||
|
|
||||||
```vim
|
|
||||||
<leader>nl
|
|
||||||
:Ex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Window Navigation
|
## Window Navigation
|
||||||
|
|
||||||
@@ -104,33 +67,28 @@ 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
|
||||||
|
|
||||||
|
Mason is installed through `vim.pack` together with `mason-lspconfig.nvim` and `nvim-lspconfig`.
|
||||||
|
|
||||||
|
This config automatically installs and enables the managed language servers on first start. The current managed set is `bashls`, `clangd`, `jsonls`, `lua_ls`, `marksman`, `taplo`, `ts_ls`, and `yamlls`.
|
||||||
|
|
||||||
|
Useful Mason commands:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:Mason
|
||||||
|
:MasonLog
|
||||||
|
:checkhealth mason
|
||||||
|
```
|
||||||
|
|
||||||
|
`ts_ls` provides TypeScript and JavaScript language server support after Mason installs `typescript-language-server`.
|
||||||
|
|
||||||
When an LSP server is attached to the current buffer:
|
When an LSP server is attached to the current buffer:
|
||||||
|
|
||||||
- `gd` go to definition
|
- `gd` go to definition
|
||||||
@@ -143,22 +101,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:
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
vim.opt_local.textwidth = 80
|
local o = vim.opt_local
|
||||||
|
|
||||||
|
o.textwidth = 80
|
||||||
|
o.expandtab = false
|
||||||
|
|||||||
3
nvim/.config/nvim/after/ftplugin/python.lua
Normal file
3
nvim/.config/nvim/after/ftplugin/python.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
local o = vim.opt_local
|
||||||
|
|
||||||
|
o.expandtab = false
|
||||||
42
nvim/.config/nvim/lua/romanzy/commands.lua
Normal file
42
nvim/.config/nvim/lua/romanzy/commands.lua
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
local uc = vim.api.nvim_create_user_command
|
||||||
|
local ac = vim.api.nvim_create_autocmd
|
||||||
|
local aug = vim.api.nvim_create_augroup
|
||||||
|
|
||||||
|
-- User commands
|
||||||
|
uc("W", "w|e", { desc = "write file then refresh buffer" })
|
||||||
|
|
||||||
|
-- Auto commands
|
||||||
|
ac("TextYankPost", {
|
||||||
|
desc = "Highlight when yanking text",
|
||||||
|
group = aug("highlight-yank", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
ac("LspAttach", {
|
||||||
|
desc = "Notify user about attached LSP clients",
|
||||||
|
group = aug("LSPOnAttach", { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
|
if client then
|
||||||
|
vim.notify(client.name .. " attached", vim.log.levels.INFO, {})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- ac("LspAttach", {
|
||||||
|
-- group = aug("lsp_attach_disable_ruff_hover", { clear = true }),
|
||||||
|
-- callback = function(args)
|
||||||
|
-- local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
-- if client == nil then
|
||||||
|
-- return
|
||||||
|
-- end
|
||||||
|
-- if client.name == "ruff" then
|
||||||
|
-- client.server_capabilities.hoverProvider = false
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- desc = "LSP: Disable hover capabilties for ruff",
|
||||||
|
-- })
|
||||||
|
|
||||||
|
|
||||||
|
-- Only show the invisible characters inside the code editing buffers
|
||||||
|
vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]])
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
require("romanzy.set")
|
require("romanzy.options")
|
||||||
require("romanzy.remap")
|
require("romanzy.keymaps")
|
||||||
|
require("romanzy.commands")
|
||||||
require("romanzy.plugins")
|
require("romanzy.plugins")
|
||||||
|
|||||||
@@ -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" })
|
||||||
@@ -40,7 +41,7 @@ map("n", "<leader>bp", "<Cmd>bprevious<CR>", { desc = "prev buffer" })
|
|||||||
map("n", "<leader>bn", "<Cmd>bnext<CR>", { desc = "next buffer" })
|
map("n", "<leader>bn", "<Cmd>bnext<CR>", { desc = "next buffer" })
|
||||||
map("n", "<leader>bd", "<Cmd>bdelete<CR>", { desc = "delete buffer" })
|
map("n", "<leader>bd", "<Cmd>bdelete<CR>", { desc = "delete buffer" })
|
||||||
|
|
||||||
map("t", "<Esc>", "<C-\\><C-n>", { desc = "exit terminal" })
|
map("t", "\\<Esc>", "<C-\\><C-n>", { desc = "exit terminal" })
|
||||||
|
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "window left" })
|
map("n", "<C-h>", "<C-w>h", { desc = "window left" })
|
||||||
map("n", "<C-j>", "<C-w>j", { desc = "window down" })
|
map("n", "<C-j>", "<C-w>j", { desc = "window down" })
|
||||||
@@ -68,12 +69,12 @@ map("n", "gl", vim.diagnostic.setloclist, { desc = "diagnostic list" })
|
|||||||
|
|
||||||
-- diagnostics only on error.
|
-- diagnostics only on error.
|
||||||
map("n", "g]", function()
|
map("n", "g]", function()
|
||||||
vim.diagnostic.goto_next({
|
vim.lsp.diagnostic.goto_next({
|
||||||
severity = vim.diagnostic.severity.ERROR,
|
severity = vim.diagnostic.severity.ERROR,
|
||||||
})
|
})
|
||||||
end, { desc = "next error" })
|
end, { desc = "next error" })
|
||||||
map("n", "g[", function()
|
map("n", "g[", function()
|
||||||
vim.diagnostic.goto_prev({
|
vim.lsp.diagnostic.goto_prev({
|
||||||
severity = vim.diagnostic.severity.ERROR,
|
severity = vim.diagnostic.severity.ERROR,
|
||||||
})
|
})
|
||||||
end, { desc = "prev error" })
|
end, { desc = "prev error" })
|
||||||
42
nvim/.config/nvim/lua/romanzy/options.lua
Normal file
42
nvim/.config/nvim/lua/romanzy/options.lua
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
local g = vim.g
|
||||||
|
local o = vim.opt
|
||||||
|
|
||||||
|
-- Leaders
|
||||||
|
g.mapleader = " " -- Uses space as the global leader key.
|
||||||
|
g.maplocalleader = " " -- Uses space as the local leader key.
|
||||||
|
|
||||||
|
-- Layout and display
|
||||||
|
o.number = true -- Shows absolute line numbers.
|
||||||
|
o.relativenumber = true -- Shows relative numbers for easier motion.
|
||||||
|
o.cursorline = true -- Highlights the line under the cursor.
|
||||||
|
o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active.
|
||||||
|
o.scrolloff = 8 -- Keeps context lines visible around the cursor.
|
||||||
|
o.signcolumn = "yes" -- Always reserves space for signs in the gutter.
|
||||||
|
o.colorcolumn = "+1" -- Highlights the preferred maximum line width.
|
||||||
|
o.wrap = false -- Prevents long lines from wrapping on screen.
|
||||||
|
o.list = true -- Displays whitespace characters using listchars.
|
||||||
|
o.listchars = {
|
||||||
|
tab = "» ",
|
||||||
|
trail = "·",
|
||||||
|
extends = "⟩",
|
||||||
|
precedes = "⟨",
|
||||||
|
nbsp = "␣",
|
||||||
|
} -- Defines how invisible characters are rendered.
|
||||||
|
o.termguicolors = true -- Enables full RGB color support.
|
||||||
|
o.mouse = "" -- Disables mouse support.
|
||||||
|
|
||||||
|
-- Indentation and editing
|
||||||
|
o.tabstop = 4 -- Renders tab characters as four columns.
|
||||||
|
o.softtabstop = 4 -- Makes tab/backspace feel like four spaces.
|
||||||
|
o.shiftwidth = 4 -- Uses four columns for each indent step.
|
||||||
|
o.expandtab = true -- Inserts spaces when indenting by default.
|
||||||
|
o.smartindent = true -- Adds indentation automatically on new lines.
|
||||||
|
o.swapfile = false -- Disables swapfile creation.
|
||||||
|
|
||||||
|
-- Search and update behavior
|
||||||
|
o.incsearch = true -- Updates search matches as you type.
|
||||||
|
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
||||||
|
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
||||||
|
|
||||||
|
-- Shell
|
||||||
|
o.shell = "bash" -- Runs shell commands through bash.
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
require("romanzy.plugins.rose-pine")
|
require("romanzy.plugins.rose-pine")
|
||||||
|
require("romanzy.plugins.mini")
|
||||||
require("romanzy.plugins.oil")
|
require("romanzy.plugins.oil")
|
||||||
require("romanzy.plugins.telescope")
|
require("romanzy.plugins.telescope")
|
||||||
require("romanzy.plugins.nvim-treesitter")
|
require("romanzy.plugins.nvim-treesitter")
|
||||||
require("romanzy.plugins.lsp")
|
require("romanzy.plugins.lsp")
|
||||||
require("romanzy.plugins.header42")
|
-- require("romanzy.plugins.header42")
|
||||||
|
|||||||
@@ -104,5 +104,6 @@ end
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
|
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
|
ensure_installed = managed_servers,
|
||||||
automatic_enable = managed_servers,
|
automatic_enable = managed_servers,
|
||||||
})
|
})
|
||||||
|
|||||||
70
nvim/.config/nvim/lua/romanzy/plugins/mini.lua
Normal file
70
nvim/.config/nvim/lua/romanzy/plugins/mini.lua
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{
|
||||||
|
src = "https://github.com/echasnovski/mini.nvim",
|
||||||
|
name = "mini.nvim",
|
||||||
|
branch = "stable",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local clue = require("mini.clue")
|
||||||
|
local icons = require("mini.icons")
|
||||||
|
local git = require("mini.git")
|
||||||
|
local diff = require("mini.diff")
|
||||||
|
local statusline = require("mini.statusline")
|
||||||
|
local hipatterns = require("mini.hipatterns")
|
||||||
|
local ai = require("mini.ai")
|
||||||
|
local notify = require("mini.notify")
|
||||||
|
local surround = require("mini.surround")
|
||||||
|
|
||||||
|
local function set_mini_diff_highlights()
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignAdd", { fg = "#9ccf8d" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignChange", { fg = "#f6c177" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignDelete", { fg = "#eb6f92" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverAdd", { fg = "#9ccf8d" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverChange", { fg = "#f6c177" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverDelete", { fg = "#eb6f92" })
|
||||||
|
end
|
||||||
|
|
||||||
|
clue.setup({
|
||||||
|
triggers = {
|
||||||
|
{ mode = "n", keys = "<leader>" },
|
||||||
|
{ mode = "n", keys = "g" },
|
||||||
|
{ mode = "n", keys = "<C-w>"},
|
||||||
|
{ mode = "n", keys = "z" },
|
||||||
|
{ mode = "i", keys = "<C-x>" },
|
||||||
|
},
|
||||||
|
clues = {
|
||||||
|
clue.gen_clues.builtin_completion(),
|
||||||
|
clue.gen_clues.g(),
|
||||||
|
clue.gen_clues.marks(),
|
||||||
|
clue.gen_clues.registers(),
|
||||||
|
clue.gen_clues.windows(),
|
||||||
|
clue.gen_clues.z(),
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
delay = 500,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
icons.setup({})
|
||||||
|
git.setup({})
|
||||||
|
diff.setup({})
|
||||||
|
set_mini_diff_highlights()
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
callback = set_mini_diff_highlights,
|
||||||
|
})
|
||||||
|
statusline.setup({ use_icons = true })
|
||||||
|
hipatterns.setup({
|
||||||
|
highlighters = {
|
||||||
|
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
|
||||||
|
hack = { pattern = "%f[%w]()HACK()%f[%W]", group = "MiniHipatternsHack" },
|
||||||
|
todo = { pattern = "%f[%w]()TODO()%f[%W]", group = "MiniHipatternsTodo" },
|
||||||
|
note = { pattern = "%f[%w]()NOTE()%f[%W]", group = "MiniHipatternsNote" },
|
||||||
|
file = { pattern = "%f[%w]()FILE()%f[%W]", group = "MiniHipatternsNote" },
|
||||||
|
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
ai.setup({})
|
||||||
|
notify.setup({})
|
||||||
|
vim.notify = notify.make_notify()
|
||||||
|
surround.setup({})
|
||||||
@@ -3,8 +3,23 @@ vim.pack.add({
|
|||||||
src = "https://github.com/stevearc/oil.nvim",
|
src = "https://github.com/stevearc/oil.nvim",
|
||||||
name = "oil.nvim",
|
name = "oil.nvim",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
src = "https://github.com/malewicz1337/oil-git.nvim",
|
||||||
|
name = "oil-git.nvim",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local function set_oil_git_highlights()
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitAdded", { link = "MiniDiffSignAdd" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitUntracked", { link = "MiniDiffSignAdd" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitModifiedStaged", { link = "MiniDiffSignChange" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitModifiedUnstaged", { link = "MiniDiffSignChange" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitRenamed", { link = "MiniDiffSignChange" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitCopied", { link = "MiniDiffSignChange" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitDeleted", { link = "MiniDiffSignDelete" })
|
||||||
|
vim.api.nvim_set_hl(0, "OilGitConflict", { link = "MiniDiffSignDelete" })
|
||||||
|
end
|
||||||
|
|
||||||
require("oil").setup({
|
require("oil").setup({
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["<C-h>"] = false,
|
["<C-h>"] = false,
|
||||||
@@ -27,3 +42,17 @@ require("oil").setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("oil-git").setup({
|
||||||
|
show_file_highlights = true,
|
||||||
|
show_directory_highlights = true,
|
||||||
|
show_file_symbols = true,
|
||||||
|
show_directory_symbols = true,
|
||||||
|
symbol_position = "none",
|
||||||
|
})
|
||||||
|
|
||||||
|
set_oil_git_highlights()
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
group = vim.api.nvim_create_augroup("romanzy_oil_git_highlights", { clear = true }),
|
||||||
|
callback = set_oil_git_highlights,
|
||||||
|
})
|
||||||
|
|||||||
@@ -9,4 +9,28 @@ vim.pack.add({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require("telescope").setup({})
|
require("telescope").setup({
|
||||||
|
defaults = {
|
||||||
|
preview = {
|
||||||
|
filesize_limit = 0.1, -- in MB
|
||||||
|
},
|
||||||
|
initial_mode = "insert",
|
||||||
|
-- winblend = 30,
|
||||||
|
file_ignore_patterns = {
|
||||||
|
"%.git/.*",
|
||||||
|
"%.cache/.*",
|
||||||
|
},
|
||||||
|
layout_strategy = "flex",
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true,
|
||||||
|
follow = true,
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
hidden = true,
|
||||||
|
follow = true,
|
||||||
|
initial_mode = "insert",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " "
|
|
||||||
|
|
||||||
vim.opt.nu = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
-- disable normie mouse stuff
|
|
||||||
vim.opt.mouse = ""
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.expandtab = false
|
|
||||||
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
|
|
||||||
vim.opt.wrap = false -- no line wrapping...
|
|
||||||
|
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
|
||||||
|
|
||||||
vim.opt.colorcolumn = "80"
|
|
||||||
|
|
||||||
vim.opt.spelllang = { 'en_us' }
|
|
||||||
|
|
||||||
vim.opt.listchars = {
|
|
||||||
tab = "» ",
|
|
||||||
trail = "·",
|
|
||||||
extends = "⟩",
|
|
||||||
precedes = "⟨",
|
|
||||||
nbsp = "␣"
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.opt.list = true
|
|
||||||
-- only show the invisible characters inside the code editing buffers
|
|
||||||
vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]])
|
|
||||||
|
|
||||||
vim.opt.shell = "bash"
|
|
||||||
@@ -12,6 +12,10 @@
|
|||||||
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
|
"mini.nvim": {
|
||||||
|
"rev": "1599a473aa6f5290a5d740b1144846e6f0c3963d",
|
||||||
|
"src": "https://github.com/echasnovski/mini.nvim"
|
||||||
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
|
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
@@ -20,6 +24,10 @@
|
|||||||
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
|
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
|
"oil-git.nvim": {
|
||||||
|
"rev": "54de208323d00c519e26280f8b5b4b821d32f955",
|
||||||
|
"src": "https://github.com/malewicz1337/oil-git.nvim"
|
||||||
|
},
|
||||||
"oil.nvim": {
|
"oil.nvim": {
|
||||||
"rev": "b73018b75affd13fa38e2fc94ef753b465f770d7",
|
"rev": "b73018b75affd13fa38e2fc94ef753b465f770d7",
|
||||||
"src": "https://github.com/stevearc/oil.nvim"
|
"src": "https://github.com/stevearc/oil.nvim"
|
||||||
|
|||||||
Reference in New Issue
Block a user