Updated config

This commit is contained in:
2024-03-02 17:06:30 +01:00
parent d6871eb3b9
commit 30c02876e8
15 changed files with 193 additions and 155 deletions

View File

@ -6,12 +6,12 @@
"mini.completion": { "branch": "main", "commit": "0cf6c4e257b5e8189ac6b3ffa2064a319c4eb8a8" },
"neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nui.nvim": { "branch": "main", "commit": "c3c7fd618dcb5a89e443a2e1033e7d11fdb0596b" },
"nui.nvim": { "branch": "main", "commit": "b81333d12f824dbed5eb231c8a4409a290fdd848" },
"nvim-lspconfig": { "branch": "master", "commit": "9553725789be682ecd945a527ec552e489ea8534" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-tree.lua": { "branch": "master", "commit": "d52fdeb0a300ac42b9cfa65ae0600a299f8e8677" },
"nvim-treesitter": { "branch": "master", "commit": "c2a265156d5799adbd9f9e7d5385735fa5d21776" },
"nvim-web-devicons": { "branch": "master", "commit": "0bb67ef952ea3eb7b1bac9c011281471d99a27bc" },
"nvim-treesitter": { "branch": "master", "commit": "e3e5ff4ebddcbfa8f5798253ebd1f9b449e8ee69" },
"nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" },
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" },

View File

@ -4,17 +4,28 @@ end
-- Basics
map("n", ";", ":", "Command mode")
map("n", "qq", "<cmd>qa!<cr>", "Quit all")
map("n", "U", "<cmd>redo<cr>", "Redo")
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
map({ "i", "n", "s", "v" }, "<C-s>", "<cmd>w<cr><esc>", "Save file")
map("n", "<C-l>", "^Da", "Rewrite line")
map("i", "<C-l>", "<esc>^Da", "Rewrite line")
map("n", "<C-a>", "ggVG", "Select all")
map("n", "<C-r>", ":%s/<C-R><C-W>//g<Left><Left>", "Replace word under cursor")
map({ "n", "v" }, "<C-b>", "^", "Beginning of line")
map("i", "<C-b>", "<esc>^i", "Beginning of line")
map({ "i", "n", "v" }, "<C-e>", "<end>", "End of line")
map("n", "qq", "<cmd>qa!<cr>", "Quit all")
-- Editing multiple instances
map("n", "<C-d>", "*#", "Search word under cursor")
map("n", "<C-r>", "*#:%s//<C-r><C-w>", "Replace word under cursor")
map("v", "<C-d>", "y/<C-r>\"<cr>N", "Search selection")
map("v", "<C-r>", "y/<C-r>\"<cr>N:%s//<C-r>\"", "Replace selection")
-- Increasing and decreasing numbers
map("n", "+", "<C-a>", "Increase number")
map("n", "-", "<C-x>", "Decrease number")
map("n", "<kPlus>", "<C-a>", "Increase number")
map("n", "<kMinus>", "<C-x>", "Decrease number")
-- Buffer management
map("n", "<C-n>", "<cmd>enew<cr>", "New file")

View File

@ -8,50 +8,46 @@ end
-- Options
local opt = vim.opt
opt.autoindent = true
opt.autowrite = false
opt.clipboard = "unnamedplus"
opt.completeopt = "menu,menuone,noinsert"
opt.conceallevel = 0
opt.cursorline = true
opt.cursorlineopt = "number"
opt.expandtab = false
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --grep"
opt.ignorecase = false
opt.mouse = "a"
opt.ruler = false
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftwidth = 4
opt.shortmess:append "scCFI"
opt.showmode = false
opt.showtabline = 0
opt.smartindent = true
opt.softtabstop = 4
opt.spell = false
opt.splitbelow = true
opt.splitright = true
opt.tabstop = 4
opt.termguicolors = true
opt.undofile = true
opt.undolevels = 10000
opt.updatetime = 250
opt.virtualedit = "onemore"
opt.wildmode = "longest:full,full"
opt.wrap = false
-- Indentation
opt.autoindent = true
opt.expandtab = false
opt.shiftwidth = 4
opt.smartindent = true
opt.softtabstop = 4
opt.tabstop = 4
-- UI
opt.fillchars = { eob = " ", vert = " " }
opt.laststatus = 0
opt.number = true
opt.relativenumber = false
opt.showtabline = 0
opt.signcolumn = "yes"
opt.statusline = "%{repeat('─',winwidth('.'))}"
-- Neovide
if g.neovide then
opt.linespace = 3
g.neovide_fullscreen = true
g.neovide_transparency = 0.92
vim.o.guifont = "UbuntuMono Nerd Font:h20:#h-none"
end
-- Undo
opt.undofile = true
opt.undolevels = 10000