vim.g.mapleader = " " vim.g.termguicolors = true vim.o.path = "**" vim.o.nu = true vim.o.cursorline = true vim.o.expandtab = true vim.o.tabstop = 4 vim.o.shiftwidth = 4 vim.o.ignorecase = true vim.o.hlsearch = true vim.o.incsearch = true vim.o.swapfile = false vim.o.backup = false vim.o.wrap = false vim.o.undofile = true vim.o.list = true vim.o.splitright = true vim.o.splitbelow = true vim.o.winborder = 'rounded' vim.o.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir" vim.g.gutentags_cache_dir = os.getenv("HOME") .. "/.cache/nvim/tags" vim.opt.clipboard = "unnamedplus" vim.o.completeopt = 'menuone,noselect' vim.cmd(":colorscheme retrobox") vim.api.nvim_create_autocmd("BufEnter", { pattern = "term://*", callback = function() vim.cmd("startinsert") end }) vim.lsp.enable({ "gopls", "gdscript" }) vim.pack.add({ { src = "https://github.com/ibhagwan/fzf-lua" }, { src = "https://github.com/tribela/transparent.nvim" }, { src = "https://github.com/neovim/nvim-lspconfig" }, { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" }, { src="https://github.com/folke/trouble.nvim" } }) require("fzf-lua").setup() require("trouble").setup() vim.api.nvim_create_autocmd('FileType', { pattern = '*', callback = function() pcall(vim.treesitter.start) vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" end, }) local map = vim.keymap.set map({"t", "n"}, "", "") map({"t", "n"}, "", "") map({"t", "n"}, "", "") map({"t", "n"}, "", "") map({"i", "n"}, "", "") map("n", '', 'noh') map("t", "", "") map("v", "J", ":m '>+1gv=gv") map("v", "K", ":m '<-2gv=gv") map("v", "", "" , ">gv") map("n", "gd", ":lua vim.lsp.buf.definition()") map("n", "p", "b#") map("n", "e", ":Ex") map("n", "c", ":bd") map("n", "ff", ":lua FzfLua.files()") map("n", "fo", ":lua FzfLua.buffers()") map("n", "sp", ":lua FzfLua.grep_project()") map("n", "sf", ":lua FzfLua.grep_curbuf()") map("n", "sw", ":lua FzfLua.grep_cword()") map("n", "sh", ":lua FzfLua.help_tags()") map("n", "pa", ":lua FzfLua.lsp_code_actions()") map('n', 'pp', ":Trouble diagnostics toggle") map("n", "1", ":vsplit | vertical resize 95 | terminala") map("n", "2", ":split | horizontal resize 25 | terminala")