vim.g.mapleader = " " vim.g.maplocalleader = "\\" vim.opt.clipboard = "unnamedplus" vim.opt.relativenumber = true vim.opt.number = true vim.opt.tabstop = 2 vim.opt.shiftwidth = 2 vim.opt.expandtab = true -- spaces vim.api.nvim_create_autocmd("FileType", { pattern = { "sh", "bash", "zsh" }, callback = function() vim.opt_local.expandtab = false vim.opt_local.tabstop = 8 vim.opt_local.shiftwidth = 8 vim.opt_local.softtabstop = 8 end, }) vim.api.nvim_create_autocmd("FileType", { pattern = "make", callback = function() vim.opt_local.expandtab = false vim.opt_local.tabstop = 8 vim.opt_local.shiftwidth = 8 vim.opt_local.softtabstop = 8 end, }) require('config.lazy') local telescope = require('telescope.builtin') vim.keymap.set('n', 'ff', telescope.find_files, { desc = 'Telescope find files' }) vim.keymap.set('n', 'fg', telescope.live_grep, { desc = 'Telescope live grep' }) vim.keymap.set('n', 'fb', telescope.buffers, { desc = 'Telescope buffers' }) vim.keymap.set('n', 'fh', telescope.help_tags, { desc = 'Telescope help tags' }) vim.keymap.set('n', 'fj', telescope.git_files, { desc = 'Telescope jj files (currently git)' }) local neotest = require('neotest') vim.keymap.set('n', 'tt', function() neotest.run.run() end, { desc = "Run nearest test" }) vim.keymap.set('n', 'tf', function() neotest.run.run(vim.fn.expand("%")) end, { desc = "Run current file" }) vim.keymap.set('n', 'ta', function() neotest.run.run(vim.fn.getcwd()) end, { desc = "Run all tests" }) vim.keymap.set('n', 'to', function() neotest.output.open({ enter = true }) end, { desc = "Show test output" }) vim.keymap.set('n', 'ts', function() neotest.summary.toggle() end, { desc = "Toggle test summary" })