Skip to content

Instantly share code, notes, and snippets.

@Kvieta1990
Created September 11, 2023 15:29
Show Gist options
  • Save Kvieta1990/c81dd1c4b35c77f34a33d64dc2bccba4 to your computer and use it in GitHub Desktop.
Save Kvieta1990/c81dd1c4b35c77f34a33d64dc2bccba4 to your computer and use it in GitHub Desktop.
Lua init config for nvim
https://www.dropbox.com/scl/fi/lh5j8z1amxk8bnppe7t6y/nvim.zip?rlkey=r59tazlmf1yzwbwn4xc4wsqrc&dl=0
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
vim.opt.mouse = ""
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true
-- empty setup using defaults
require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
sort_by = "case_sensitive",
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
local o = vim.o
o.expandtab = true
o.smartindent = false
o.tabstop = 4
o.shiftwidth = 4
o.scrolloff = 0
vim.wo.relativenumber = false
vim.api.nvim_set_hl(0, 'LineNr', { fg = "#8be9fd"})
vim.keymap.set("n", "<C-n>", "<Cmd>NvimTreeToggle<CR>", { silent = true })
vim.api.nvim_set_keymap('n', 'd', '"0d', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'y', '"0y', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'p', '"0p', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'P', '"0P', { noremap = true, silent = true })
vim.api.nvim_del_keymap('n', 'H')
vim.api.nvim_del_keymap('n', 'L')
-- vim.api.nvim_set_option('whichwrap', '<,>,[,]')
-- The following config enables the cursor wrap for the insert mode only.
-- The config above enables both the insert and normal mode wrapping.
vim.api.nvim_set_option('whichwrap', '[,]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment