Files
nvim/init.lua

77 lines
1.5 KiB
Lua

vim.g.mapleader = ' '
vim.opt.number = true -- Line numbers
vim.opt.relativenumber = true -- Relative line numbers
vim.opt.tabstop = 2 -- Tab width
vim.opt.shiftwidth = 2 -- Indent width
vim.opt.expandtab = true -- Use spaces instead of tabs
vim.opt.wrap = true
-- vim.cmd.colorscheme("retrobox")
vim.opt.termguicolors = true
vim.opt.clipboard = 'unnamedplus' -- System clipboard
vim.api.nvim_set_hl(0, "LineNr", { ctermfg = 8 })
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "none" })
-- Git signs
require('gitsigns').setup()
require('flash').setup()
vim.keymap.set({"n","x","o"}, "s", function()
require("flash").jump()
end)
require("nvim-treesitter").setup({
ensure_installed = {
"lua",
"python",
"c",
"cpp",
"go",
"bash",
"json",
"yaml",
"html",
"css",
"javascript",
"markdown",
"markdown_inline"
},
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
},
})
require("rakshit")
vim.cmd("packadd nvim.undotree")
vim.keymap.set("n", "<leader>u", require("undotree").open)
vim.keymap.set("n", "<leader>ee", function ()
vim.cmd("NvimTreeFocus")
end)
vim.api.nvim_create_user_command("QaConfirm", function()
local choice = vim.fn.confirm("Quit all windows?", "&Yes\n&No", 2)
if choice == 1 then
vim.cmd("qa")
end
end, {})
vim.cmd("cabbrev qa QaConfirm")