diff --git a/init.lua b/init.lua index 64317a5..e22ed04 100644 --- a/init.lua +++ b/init.lua @@ -8,6 +8,17 @@ package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share/lua/5.1/?.lua' vim.opt_local.autochdir = true + +vim.opt.spelllang = 'en_us' +vim.opt.spell = true + +vim.keymap.set('n', '', ':!feh --geometry 640x480+1200+50 ', { desc = 'Show image under cursor with feh' }) + +require 'keymaps' + +vim.opt.foldmethod = syntax +vim.opt.foldlevel = 99 + -- END OF TESTING REGION --[[ @@ -165,6 +176,7 @@ vim.opt.inccommand = 'split' -- Show which line your cursor is on vim.opt.cursorline = true +vim.opt.cursorlineopt = 'number' -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 @@ -291,12 +303,12 @@ require('lazy').setup({ event = 'VimEnter', -- Sets the loading event to 'VimEnter' config = function() -- This is the function that runs, AFTER loading require('which-key').setup() - -- Document existing key chains + -- need to try out specific trigger keys, AND : https://github.com/folke/which-key.nvim require('which-key').add { { 'c', group = '[C]ode' }, { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, + -- { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, { 'w', group = '[W]orkspace' }, { 't', group = '[T]oggle' }, @@ -383,7 +395,9 @@ require('lazy').setup({ local builtin = require 'telescope.builtin' vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) + vim.keymap.set('n', 'sb', ':Telescope neoclip', { desc = '[S]earch [B]uffers' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', 'si', builtin.git_files, { desc = '[S]earch [F]iles [i]n git repo' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) @@ -391,8 +405,9 @@ require('lazy').setup({ vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - vim.keymap.set('n', 'sl', ':Telescope luasnip', { desc = '[S]earch [L]uasnip' }) + vim.keymap.set('n', 'se', ':Telescope emoji', { desc = '[S]earch [E]mojis' }) + vim.keymap.set('i', '', ':Telescope emoji', { desc = '[S]earch [E]mojis' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() @@ -628,6 +643,8 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'black', -- Used to format Python code + 'isort', -- Used to format Python code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -675,7 +692,7 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, @@ -879,6 +896,7 @@ require('lazy').setup({ config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + require('nvim-treesitter.install').prefer_git = true ---@diagnostic disable-next-line: missing-fields require('nvim-treesitter.configs').setup(opts) @@ -904,7 +922,7 @@ require('lazy').setup({ require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', require 'kickstart.plugins.autopairs', - require 'kickstart.plugins.neo-tree', + -- require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`