added readme

This commit is contained in:
Andre Herniques 2023-06-12 13:18:07 +01:00
parent d0463a9289
commit ba8bd22858
3 changed files with 221 additions and 189 deletions

32
README.md Normal file
View File

@ -0,0 +1,32 @@
# My NeoVim configuration
## Requirements
- NeoVim
- [Packer](https://github.com/wbthomason/packer.nvim)
To install packer run
```bash
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
```
To run LSP (autocomplete) you will also need the server for that language.
Currently, the languages servers that are configured are:
- bash (bashls)
- c/c++ (ccls)
- prisma (prismals)
- python (pylsp)
- rust (rust_analyzer)
- svelte (sveltelsp)
- tex (ltex)
- ts (tsserver)
- vlang (vls)
- zig (zls)
## Some useful shortcuts
- ' f': Find files uses fuzzy finding to search for files in the folder you are currently are
- ' /': Search the files using grep
- '<C-F>': Open file structure
- 'gd': Goto definition
- 'K': Show call signature
- ']d': Goto next error
- '[d': Goto previous error

View File

@ -12,11 +12,11 @@ vim.opt.background = 'dark'
-- vim.g.cyberpunk_cursorline='black' -- vim.g.cyberpunk_cursorline='black'
-- vim.cmd('colorscheme ayu') -- vim.cmd('colorscheme ayu')
-- vim.cmd('colorscheme night_owl_light') vim.cmd('colorscheme night_owl_light')
-- vim.cmd('colorscheme eva01') -- vim.cmd('colorscheme eva01')
-- vim.cmd('colorscheme cyberpunk') -- vim.cmd('colorscheme cyberpunk')
-- vim.cmd('colorscheme catppuccin-latte') -- vim.cmd('colorscheme catppuccin-latte')
vim.cmd('colorscheme oxocarbon') -- vim.cmd('colorscheme oxocarbon')
-- examples for your init.lua -- examples for your init.lua
@ -26,211 +26,211 @@ vim.g.loaded_netrwPlugin = 1
-- setup with some options -- setup with some options
require("nvim-tree").setup{ -- BEGIN_DEFAULT_OPTS require("nvim-tree").setup{ -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true, auto_reload_on_write = true,
create_in_closed_folder = false, create_in_closed_folder = false,
disable_netrw = false, disable_netrw = false,
hijack_cursor = false, hijack_cursor = false,
hijack_netrw = true, hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false, hijack_unnamed_buffer_when_opening = false,
ignore_buffer_on_setup = false, ignore_buffer_on_setup = false,
open_on_setup = false, open_on_setup = false,
open_on_setup_file = false, open_on_setup_file = false,
open_on_tab = false, open_on_tab = false,
ignore_buf_on_tab_change = {}, ignore_buf_on_tab_change = {},
sort_by = "name", sort_by = "name",
root_dirs = {}, root_dirs = {},
prefer_startup_root = false, prefer_startup_root = false,
sync_root_with_cwd = false, sync_root_with_cwd = false,
reload_on_bufenter = false, reload_on_bufenter = false,
respect_buf_cwd = false, respect_buf_cwd = false,
on_attach = "disable", on_attach = "disable",
remove_keymaps = false, remove_keymaps = false,
select_prompts = false, select_prompts = false,
view = { view = {
adaptive_size = false, adaptive_size = false,
centralize_selection = false, centralize_selection = false,
width = 30, width = 30,
hide_root_folder = false, hide_root_folder = false,
side = "left", side = "left",
preserve_window_proportions = false, preserve_window_proportions = false,
number = false, number = false,
relativenumber = false, relativenumber = false,
signcolumn = "yes", signcolumn = "yes",
mappings = { mappings = {
custom_only = false, custom_only = false,
list = { list = {
-- user mappings go here -- user mappings go here
},
},
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
}, },
}, },
float = { renderer = {
enable = false, add_trailing = false,
quit_on_focus_loss = true, group_empty = false,
open_win_config = { highlight_git = false,
relative = "editor", full_name = false,
border = "rounded", highlight_opened_files = "none",
width = 30, root_folder_modifier = ":~",
height = 30, indent_width = 2,
row = 1, indent_markers = {
col = 1, enable = false,
inline_arrows = true,
icons = {
corner = "",
edge = "",
item = "",
bottom = "",
none = " ",
},
}, },
},
},
renderer = {
add_trailing = false,
group_empty = false,
highlight_git = false,
full_name = false,
highlight_opened_files = "none",
root_folder_modifier = ":~",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
icons = { icons = {
corner = "", webdev_colors = true,
edge = "", git_placement = "before",
item = "", padding = " ",
bottom = "", symlink_arrow = "",
none = " ", show = {
}, file = true,
}, folder = true,
icons = { folder_arrow = true,
webdev_colors = true, git = true,
git_placement = "before",
padding = " ",
symlink_arrow = "",
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
bookmark = "",
folder = {
arrow_closed = "",
arrow_open = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
}, },
git = { glyphs = {
unstaged = "🙄", default = "",
staged = "🥺", symlink = "",
unmerged = "🫢", bookmark = "",
renamed = "📛", folder = {
untracked = "💫", arrow_closed = "",
deleted = "🗑️", arrow_open = "",
ignored = "🤷", default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
},
git = {
unstaged = "🙄",
staged = "🥺",
unmerged = "🫢",
renamed = "📛",
untracked = "💫",
deleted = "🗑️",
ignored = "🤷",
},
}, },
}, },
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
symlink_destination = true,
}, },
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, hijack_directories = {
symlink_destination = true,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_root = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = true,
show_on_dirs = false,
debounce_delay = 50,
icons = { error = "☣️ ", warning = "😞", hint = "❤️ ", info = " " }
,
},
filters = {
dotfiles = false,
custom = {},
exclude = {},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
},
git = {
enable = true,
ignore = true,
show_on_dirs = true,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true, enable = true,
global = false, auto_open = true,
restrict_above_cwd = false,
}, },
expand_all = { update_focused_file = {
max_folder_discovery = 300, enable = false,
update_root = false,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = true,
show_on_dirs = false,
debounce_delay = 50,
icons = { error = "☣️ ", warning = "😞", hint = "❤️ ", info = " " }
,
},
filters = {
dotfiles = false,
custom = {},
exclude = {}, exclude = {},
}, },
file_popup = { filesystem_watchers = {
open_win_config = { enable = true,
col = 1, debounce_delay = 50,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
},
}, },
open_file = { git = {
quit_on_open = false, enable = true,
resize_window = true, ignore = true,
window_picker = { show_on_dirs = true,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true, enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", global = false,
exclude = { restrict_above_cwd = false,
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, },
buftype = { "nofile", "terminal", "help" }, expand_all = {
max_folder_discovery = 300,
exclude = {},
},
file_popup = {
open_win_config = {
col = 1,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
}, },
}, },
open_file = {
quit_on_open = false,
resize_window = true,
window_picker = {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
}, },
remove_file = { trash = {
close_window = true, cmd = "gio trash",
require_confirm = true,
}, },
}, live_filter = {
trash = { prefix = "[FILTER]: ",
cmd = "gio trash", always_show_folders = true,
require_confirm = true,
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
}, },
}, log = {
notify = { enable = false,
threshold = vim.log.levels.INFO, truncate = false,
}, types = {
} all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
notify = {
threshold = vim.log.levels.INFO,
},
}

View File

@ -194,7 +194,7 @@ keymap("n", "]E", function()
require("lspsaga.diagnostic").goto_next({ severity = vim.diagnostic.severity.ERROR }) require("lspsaga.diagnostic").goto_next({ severity = vim.diagnostic.severity.ERROR })
end, { silent = true }) end, { silent = true })
keymap("n","<leader>o", "<cmd>LSoutlineToggle<CR>",{ silent = true }) -- keymap("n","<leader>o", "<cmd>LSoutlineToggle<CR>",{ silent = true })
keymap("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true }) keymap("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true })
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm<CR>", { silent = true }) keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm<CR>", { silent = true })
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm lazygit<CR>", { silent = true }) keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm lazygit<CR>", { silent = true })