diff --git a/init.lua b/init.lua index f4abc21..5541f5c 100644 --- a/init.lua +++ b/init.lua @@ -125,4 +125,25 @@ require("lazy").setup({ install = { colorscheme = { "retrobox" } }, -- automatically check for plugin updates checker = { enabled = true }, +}, +{ + ui = { + -- If you are using a Nerd Font: set icons to an empty table which will use the + -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table + icons = vim.g.have_nerd_font and {} or { + cmd = '⌘', + config = '🛠', + event = '📅', + ft = '📂', + init = '⚙', + keys = '🗝', + plugin = '🔌', + runtime = '💻', + require = '🌙', + source = '📄', + start = '🚀', + task = '📌', + lazy = '💤 ', + }, + }, }) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..7c3fbb6 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,12 @@ +return { -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + }, +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..489d39a --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,64 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + always_show_tabline = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + refresh_time = 16, -- ~60fps + events = { + 'WinEnter', + 'BufEnter', + 'BufWritePost', + 'SessionLoadPost', + 'FileChangedShellPost', + 'VimResized', + 'Filetype', + 'CursorMoved', + 'CursorMovedI', + 'ModeChanged', + }, + } + }, + sections = { + lualine_a = {'mode', 'lsp_status'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + -- lualine_d = {'tabs', 'windows'}, + lualine_x = {'searchcount', 'selectioncount', 'fileformat', 'filetype'}, + lualine_y = {'progress', 'location'}, + lualine_z = {{'datetime', style = "%m/%d %H:%M"}} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = { + -- lualine_a = {'filename'} + }, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} +end +} + diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua new file mode 100644 index 0000000..44dd3cd --- /dev/null +++ b/lua/plugins/mini.lua @@ -0,0 +1,38 @@ +return { +-- Collection of various small independent plugins/modules + 'echasnovski/mini.nvim', + config = function() + -- Better Around/Inside textobjects + -- + -- Examples: + -- - va) - [V]isually select [A]round [)]paren + -- - yinq - [Y]ank [I]nside [N]ext [Q]uote + -- - ci' - [C]hange [I]nside [']quote + require('mini.ai').setup { n_lines = 500 } + + -- Add/delete/replace surroundings (brackets, quotes, etc.) + -- + -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren + -- - sd' - [S]urround [D]elete [']quotes + -- - sr)' - [S]urround [R]eplace [)] ['] + require('mini.surround').setup() + + -- Simple and easy statusline. + -- You could remove this setup call if you don't like it, + -- and try some other statusline plugin + --local statusline = require 'mini.statusline' + ---- set use_icons to true if you have a Nerd Font + --statusline.setup { use_icons = vim.g.have_nerd_font } + + ---- You can configure sections in the statusline by overriding their + ---- default behavior. For example, here we set the section for + ---- cursor location to LINE:COLUMN + -----@diagnostic disable-next-line: duplicate-set-field + --statusline.section_location = function() + -- return '%2l:%-2v' + --end + + -- ... and there is more! + -- Check out: https://github.com/echasnovski/mini.nvim + end, +} diff --git a/lua/plugins/simple.lua b/lua/plugins/simple.lua index 602615e..a93273b 100644 --- a/lua/plugins/simple.lua +++ b/lua/plugins/simple.lua @@ -1,87 +1,13 @@ return { 'soywod/iris.vim', -- unsure 'tpope/vim-commentary', -- commenting lines with shortcut - 'vimpostor/vim-tpipeline', -- unsure - 'michaeljsmith/vim-indent-object', -- autoindent. May delete + -- 'vimpostor/vim-tpipeline', -- integrate with tmux status-line 'kshenoy/vim-signature', -- tag lines 'mg979/vim-visual-multi', -- work on multiple lines at once - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + {'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + config = function() require('guess-indent').setup {} end,}, 'obsidian-nvim/obsidian.nvim', -- work with obsidian - - { -- Useful plugin to show you pending keybinds. - 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' - opts = { - -- delay between pressing a key and opening which-key (milliseconds) - -- this setting is independent of vim.o.timeoutlen - delay = 0, - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default which-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, - }, - - -- Document existing key chains - spec = { - { 's', group = '[S]earch' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, - }, - }, - - { -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - }, - }, - - { 'alex-popov-tech/store.nvim', - dependencies = { 'OXY2DEV/markview.nvim' }, - opts = {}, - cmd = 'Store', - }, - - { 'edluffy/hologram.nvim', - auto_display = true, -- WIP automatic markdown image display, may be prone to breaking - }, - + { 'edluffy/hologram.nvim', auto_display = true,}, --image viewer + 'nvim-tree/nvim-web-devicons', -- nerdfont! + 'nvim-lualine/lualine.nvim', -- lualine } diff --git a/lua/plugins/store.lua b/lua/plugins/store.lua new file mode 100644 index 0000000..892f373 --- /dev/null +++ b/lua/plugins/store.lua @@ -0,0 +1,5 @@ +return { 'alex-popov-tech/store.nvim', + dependencies = { 'OXY2DEV/markview.nvim' }, + opts = {}, + cmd = 'Store', + } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..0a83be9 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,4 @@ +return { + 'nvim-telescope/telescope.nvim', tag = 'v0.2.0', + dependencies = { 'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep', 'sharkdp/fd' } + } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..cb9de39 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,25 @@ +return { -- Highlight, edit, and navigate code + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + -- main = 'nvim-treesitter.configs', -- Sets main module to use for opts + -- -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + -- opts = { + -- ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + -- -- Autoinstall languages that are not installed + -- auto_install = true, + -- highlight = { + -- enable = true, + -- -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. + -- -- If you are experiencing weird indenting issues, add the language to + -- -- the list of additional_vim_regex_highlighting and disabled languages for indent. + -- additional_vim_regex_highlighting = { 'ruby' }, + -- }, + -- indent = { enable = true, disable = { 'ruby' } }, + -- }, + -- -- There are additional nvim-treesitter modules that you can use to interact + -- -- with nvim-treesitter. You should go explore a few and see what interests you: + -- -- + -- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` + -- -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context + -- -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + } diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua new file mode 100644 index 0000000..4f663be --- /dev/null +++ b/lua/plugins/whichkey.lua @@ -0,0 +1,52 @@ +return { -- Useful plugin to show you pending keybinds. + 'folke/which-key.nvim', + event = 'VimEnter', -- Sets the loading event to 'VimEnter' + opts = { + -- delay between pressing a key and opening which-key (milliseconds) + -- this setting is independent of vim.o.timeoutlen + delay = 0, + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default which-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = ' ', + Down = ' ', + Left = ' ', + Right = ' ', + C = ' ', + M = ' ', + D = ' ', + S = ' ', + CR = ' ', + Esc = ' ', + ScrollWheelDown = ' ', + ScrollWheelUp = ' ', + NL = ' ', + BS = ' ', + Space = ' ', + Tab = ' ', + F1 = '', + F2 = '', + F3 = '', + F4 = '', + F5 = '', + F6 = '', + F7 = '', + F8 = '', + F9 = '', + F10 = '', + F11 = '', + F12 = '', + }, + }, + + -- Document existing key chains + spec = { + { 's', group = '[S]earch' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, + }, + }