add nvim config

This commit is contained in:
maxscout
2025-06-30 21:21:27 -04:00
commit 21debd959b
15 changed files with 316 additions and 0 deletions

60
lua/config/init.lua Executable file
View File

@@ -0,0 +1,60 @@
vim.g.mapleader = " "
require("config.lazy")
require('lspconfig').gdscript.setup({})
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.laststatus = 3
vim.cmd.colorscheme "catppuccin-macchiato"
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.wrap = false
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.termguicolors = true
vim.opt.background = "dark"
vim.cmd "set noshowmode"
vim.cmd "set nowrap"
vim.opt.backspace = "indent,eol,start"
vim.opt.clipboard:append("unnamedplus")
vim.opt.splitright = true
vim.opt.splitbelow = true
-- vim.api.nvim_command('autocmd VimEnter * :set laststatus=3')
vim.keymap.set("n", "<leader>e", ":Tex<CR>")
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
local pipepath = vim.fn.stdpath("cache") .. "/server.pipe"
if not vim.loop.fs_stat(pipepath) then
vim.fn.serverstart(pipepath)
end
vim.keymap.set("n", "<Leader>t", ":split<CR>:term<CR>")
vim.keymap.set("n", "<Leader>f", ":Telescope find_files<CR>")
vim.keymap.set("n", "<Leader>e", ":NvimTreeToggle<CR>")
vim.keymap.set("n", "<Leader>n", ":tabnew<CR>:Telescope find_files<CR>")
vim.keymap.set("n", "<Leader>v", ":vsplit<CR>")
vim.keymap.set("n", "<Leader>h", ":split<CR>")
vim.keymap.set("n", "<Leader>m", ":Mason<CR>")
vim.keymap.set('t', "<C-q>", "<C-\\><C-n><C-w>h")
vim.keymap.set("n", "<Tab>", ":tabn<CR>")
vim.keymap.set("n", "<Tab>", ":tabp<CR>")
-- vim.keymap.set("", "j", "<Left>")
-- vim.keymap.set("", "k", "<Up>")
-- vim.keymap.set("", "l", "<Down>")
-- vim.keymap.set("", ";", "<Right>")
-- vim.keymap.set("n", "<C-j>", "<C-W>h")
-- vim.keymap.set("n", "<C-k>", "<C-W>k")
-- vim.keymap.set("n", "<C-l>", "<C-W>j")
-- vim.keymap.set("n", "<C-;>", "<C-W>l")
vim.keymap.set("n", "F", ":%s//<Left>")
vim.keymap.set("n", "f", ":%s//g<Left><Left>")