diff --git a/minit.lua b/minit.lua index 129701c..004bf41 100644 --- a/minit.lua +++ b/minit.lua @@ -7,6 +7,15 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' +-- Minimal options +-- Display relative line numbers +-- Except to the active line +vim.opt.relativenumber = true +vim.opt.number = true + +-- Enable mouse mode +vim.opt.mouse = 'a' + -- Install package manager -- https://github.com/folke/lazy.nvim -- `:help lazy.nvim.txt` for more info @@ -25,120 +34,13 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ - { - "Mofiqul/adwaita.nvim", - lazy = false, - priority = 1000, - config = function() - vim.cmd('colorscheme adwaita') - end - }, + -- { + -- "Mofiqul/adwaita.nvim", + -- lazy = false, + -- priority = 1000, + -- config = function() + -- vim.cmd('colorscheme adwaita') + -- end + -- }, - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = true, - theme = 'adwaita', - component_separators = '|', - section_separators = '', - }, - }, - }, - - { - -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - dependencies = { - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - build = ':TSUpdate', - } }) - -vim.wo.number = true - --- [[ Configure Treesitter ]] --- See `:help nvim-treesitter` -require('nvim-treesitter.configs').setup { - -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { }, - - -- Do not install parses synchronously - sync_install = false, - - -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) - auto_install = false, - - -- List of parsers to ignore installing - -- ignore_install = { "markdown" }, - - -- Required property, but empty - modules = {}, - - highlight = { - enable = true, - }, - indent = { enable = true, disable = { 'python' } }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = '', - node_incremental = '', - scope_incremental = '', - node_decremental = '', - }, - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['aa'] = '@parameter.outer', - ['ia'] = '@parameter.inner', - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', - }, - goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', - }, - goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', - }, - goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', - }, - }, - swap = { - enable = true, - swap_next = { - ['a'] = '@parameter.inner', - }, - swap_previous = { - ['A'] = '@parameter.inner', - }, - }, - }, -} - --- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) -vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })