From c5f9e83e2b00cc03fc486f5471e46499df9417a8 Mon Sep 17 00:00:00 2001 From: Angus Tomlinson Date: Tue, 24 Dec 2024 13:35:33 -0800 Subject: [PATCH] Bring nvim to parity with old setup --- .gitignore | 1 - init.lua | 2 +- lazy-lock.json | 40 +++++ lua/custom/plugins/alpha-nvim.lua | 65 ++++++++ lua/custom/plugins/bufferline.lua | 17 +++ lua/custom/plugins/dressing.lua | 11 ++ lua/custom/plugins/leap.lua | 8 + lua/custom/plugins/lualine.lua | 100 +++++++++++++ lua/custom/plugins/markdown-preview.lua | 8 + lua/custom/plugins/marks.lua | 6 + lua/custom/plugins/telescope-file-browser.lua | 4 + lua/kickstart/plugins/cmp.lua | 141 ++++++++++++++++-- lua/kickstart/plugins/conform.lua | 4 +- .../{indent_line.lua => indent-blankline.lua} | 0 lua/kickstart/plugins/lspconfig.lua | 19 ++- lua/kickstart/plugins/telescope.lua | 72 ++++++++- lua/kickstart/plugins/treesitter.lua | 2 +- lua/kickstart/plugins/which-key.lua | 23 ++- lua/lazy-plugins.lua | 9 +- lua/options.lua | 35 ++++- 20 files changed, 523 insertions(+), 44 deletions(-) create mode 100644 lazy-lock.json create mode 100644 lua/custom/plugins/alpha-nvim.lua create mode 100644 lua/custom/plugins/bufferline.lua create mode 100644 lua/custom/plugins/dressing.lua create mode 100644 lua/custom/plugins/leap.lua create mode 100644 lua/custom/plugins/lualine.lua create mode 100644 lua/custom/plugins/markdown-preview.lua create mode 100644 lua/custom/plugins/marks.lua create mode 100644 lua/custom/plugins/telescope-file-browser.lua rename lua/kickstart/plugins/{indent_line.lua => indent-blankline.lua} (100%) diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/init.lua b/init.lua index 3784c1a18c9..6c6d42bd327 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] require 'options' diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..ca946647f07 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,40 @@ +{ + "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, + "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, + "bufferline.nvim": { "branch": "main", "commit": "5726c4e291224181903e960119a11e20ac677a0a" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "339b3e4519ec49312d34fcfa275aa15bfaa67025" }, + "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, + "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, + "leap.nvim": { "branch": "main", "commit": "c6bfb191f1161fbabace1f36f578a20ac6c7642c" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, + "nvim-lspconfig": { "branch": "master", "commit": "c580f34bc5fdca8aaf737a9ab8a5d775cb940e57" }, + "nvim-treesitter": { "branch": "master", "commit": "096babebf6daef2a046650883082ed2b3dcc5b67" }, + "nvim-web-devicons": { "branch": "master", "commit": "c1a86a2c386c55efc02fa2ec2c3a914af653d954" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" } +} diff --git a/lua/custom/plugins/alpha-nvim.lua b/lua/custom/plugins/alpha-nvim.lua new file mode 100644 index 00000000000..691da1c424d --- /dev/null +++ b/lua/custom/plugins/alpha-nvim.lua @@ -0,0 +1,65 @@ +return { + 'goolord/alpha-nvim', + -- dependencies = { 'echasnovski/mini.icons' }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + local alpha = require 'alpha' + local dashboard = require 'alpha.themes.dashboard' + + local function header() + return { + ' ', + ' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣶⣾⣿⡿⠛⣒⣢⠀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀⠀⠀⠀⠀⢠⣴⣿⣿⣿⣿⣿⠟⢛⣫⣭⣤⣬⡛⠋⢰⣶⢶⣯⣟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀⠀⠀⣠⡾⣻⡽⣭⠙⣫⣥⣶⠿⠿⢛⣛⡛⣿⣿⡆⢻⣾⣿⣽⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⠀⣸⠏⠀⠘⢟⠃⢸⡿⠃⠤⠞⠛⣛⡿⢃⣿⣿⢇⣾⡿⡟⣧⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⢰⡟⢠⣴⣄⠀⢠⣈⠿⠶⠶⠞⣛⣩⣶⣿⣿⠋⡞⡜⢠⢱⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⢠⣾⢡⣾⣿⣿⣦⣈⠻⣷⣶⣶⣾⣿⣿⣿⠟⠁⠔⢀⠃⠟⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⣸⣿⣿⡟⠃⠙⣿⣿⣷⣮⣭⣉⣩⣭⣤⣴⣦⠀⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⣿⣿⣿⠃⢀⣤⣤⣍⡻⠿⢿⣿⣿⣿⣿⣿⣿⡀⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⣿⣿⡿⢰⣿⠟⠛⠻⣷⡀⠀⠀⣠⣾⣿⣿⣿⣇⢻⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣤⣤⣀⠀⠀⠀⠀⠀', + ' ⣿⣿⡇⣾⣿⠀⠀⠀⢹⡇⠀⣰⣿⣿⠟⠉⣀⣤⣤⣻⣿⣷⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣦⡀⠀⠀', + ' ⢿⣿⡇⢿⣿⠀⠀⠀⢸⡇⢠⣿⡿⢋⣴⣾⣿⡿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣶⣶⣶⣤⣤⣤⣤⣤⣤⣄⣀⠀⠀⠀⠀⢀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣷⡀⠀', + ' ⢸⣿⣷⢸⣿⠀⢰⡄⣼⠇⣾⣿⢱⣿⡏⠉⠀⣴⣦⡄⠉⠛⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠋⣉⣭⣥⣶⣶⣶⣾⣿⣿⣿⣷⣶⣦⡈⠻⣿⣿⣿⣶⣦⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣷⠀', + ' ⠈⢿⣿⡈⢻⣧⠀⠹⠏⢰⣿⡇⢹⣿⠀⠀⠀⡿⠛⢿⣧⠀⠈⢿⣿⣿⣿⠟⣫⣵⠶⠾⠟⠛⠛⠛⠛⠛⠛⠿⠿⢿⣿⣿⣿⣿⣿⠀⢸⣿⣿⣿⣿⣿⣿⣿⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣹⣿⡿⣿⣿⣧', + ' ⠘⣿⣧⡀⢻⣧⡀⠀⢸⣿⠇⠘⣿⡇⠀⠀⡇⠀⠀⢿⣷⠀⢸⣿⠟⣡⣿⠋⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣤⣤⡄⢹⣿⣿⡇⠀⠘⠋⢉⣀⣤⣤⣤⣄⣙⡻⢷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠇⢸⣿⣿', + '⠀ ⠀ ⠘⢿⣷⡀⠹⢿⣶⣤⣿⡇⠀⠘⣿⣤⣀⣀⣠⣤⣾⠿⠃⠼⠉⣰⡿⠁⠀⠀⢀⣰⣶⡾⠿⠿⠿⠿⠿⣿⣿⣿⠏⢸⣿⡟⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣭⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⠏⠀⣼⣿⡏', + '⠀ ⠀⠀ ⠈⠻⣿⣄⠀⠙⠻⠿⣷⢠⡄⠉⠉⣛⣛⣛⣋⣁⣀⡀⠀⣠⣿⠁⠀⠀⣴⣿⠟⠁⠀⠀⢀⡀⠀⣠⣿⣿⠏⢀⣾⡿⢁⣼⣿⡿⠟⠛⠉⠉⠉⠙⠻⠿⣿⣿⣿⣷⡻⣿⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣿⡿⣉⣴⢠⣿⣿⠀', + '⠀ ⠀⠀ ⠀⠀⠈⠙⠳⡄⠀⣀⡴⠋⢁⣼⣿⢛⣹⣭⣯⡛⣻⣷⢠⣿⡇⠀⠀⣼⣿⣥⣤⣶⠖⠊⠁⢠⣾⣿⣿⠏⢠⣾⡟⣵⣿⠟⠁⠀⠀⢀⣤⣴⣶⣦⡀⠀⠘⢻⣿⣿⡇⢻⣿⣿⣿⣿⣶⣦⣤⣄⣀⡀⠀⣀⣠⣤⣤⣶⣿⣿⠟⢫⣽⣾⣿⢡⣿⣿⠃⠀', + '⠀ ⠀⠀ ⠀⠀⣀⣤⣶⣾⣿⠋⠀⠐⠿⠿⣿⣶⠶⠾⠛⢁⣿⡏⣸⣿⠀⠀⠀⠙⠛⠋⠁⢀⣀⣴⣾⣿⣿⡿⢋⣴⣿⣟⣿⡿⠋⠀⣠⣴⣾⠿⠟⠛⠛⢿⣿⣶⡄⠀⢻⣿⣷⠀⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⠟⢛⣋⣥⣶⣾⣿⣿⠏⣠⣿⡿⠁⠀⠀', + '⠀ ⠀⠀⢀⣼⣿⣿⣿⣿⣿⣧⣤⣤⣤⣠⣤⣤⣤⣤⣴⣿⣿⡇⣿⣿⣤⣤⣤⣤⣤⣶⣿⣿⣿⠿⠟⠛⢃⣴⣿⡿⢣⣾⣿⠃⠀⣼⣿⠟⠁⠀⣠⣤⣶⣄⢻⣿⣿⡄⠀⢿⣿⠀⣼⣷⠙⣿⣿⣧⠀⠀⠀⠤⠀⠰⠞⠛⢛⣿⣿⣿⡿⠋⢀⣼⣿⡟⠁⠀⠀⠀', + '⠀ ⠀⢰⣿⣿⣿⣿⣿⣿⠟⠛⠛⢻⣿⣛⣛⠿⠿⠿⠿⠿⠛⠉⠛⠛⠛⠛⠛⠛⠉⠉⠉⢀⣀⣠⣴⣾⣿⡿⠟⠀⣿⣿⠇⢀⣼⡿⠁⢀⣴⠿⠟⠙⠿⣿⣆⠹⣿⣿⣄⠸⣿⠀⣿⣿⣄⠈⢿⣿⣷⣦⣴⣶⣶⣶⣾⣿⠿⠟⠋⢁⣤⣾⣿⠟⠉⠀⠀⠀⠀⠀', + ' ⠀ ⢠⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⠈⢿⣿⠛⡛⢶⣶⢌⠳⠶⣶⣶⣤⣤⣤⣤⣤⣶⣶⣶⣿⣿⣿⣿⣿⣿⡥⠄⢸⣿⣿⠀⢸⣿⣇⠐⠋⠁⠀⠀⠀⠀⣿⣿⣄⢿⣿⣿⡀⠟⢠⣿⣿⣿⣦⣌⣙⣛⣛⣛⣛⣛⣉⣉⣠⣤⣤⣶⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⣼⣿⣿⣿⣿⢿⣿⡇⠀⠀⠀⠀⠈⣿⣷⡌⠚⣡⣾⠀⠀⠀⠉⠉⠛⠛⠛⠛⠛⠿⠟⠻⠛⠛⠛⠉⠁⠀⠀⢸⣿⣿⣄⠘⠛⠻⣿⣿⣿⣶⣾⣿⣿⣿⠟⠋⢸⣿⣿⣧⠀⢾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⠹⠋⠸⣿⠛⠃⠙⠧⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⠿⣿⣷⣶⣤⣄⣀⣀⠀⠀⠀⣀⣀⣀⣀⣼⣿⣿⣿⠀⠀⠀⠀⠀⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀ ⠀ ⠀⠀⠀⠀⠀⠀⢀⣤⢴⣾⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢛⠻⢿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀⠀⠀⠀⠀ ⠀ ⠀⠐⠛⠼⠿⠟⡹⠿⠿⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣾⣿⣭⣥⣶⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⠛⠛⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠟⠿⠟⠛⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', + ' ', + ' ', + } + end + + dashboard.section.header.val = header() + + dashboard.section.buttons.val = { + dashboard.button('e', ' New file', ':ene startinsert '), + dashboard.button('c', ' Configuration', ':e $MYVIMRC '), + dashboard.button('q', ' Quit Neovim', ':qa'), + } + + local datetime = os.date '%d-%m-%Y  %H:%M:%S' + + dashboard.section.footer.val = datetime + + dashboard.section.footer.opts.hl = 'Constant' + dashboard.section.header.opts.hl = 'Include' + dashboard.section.buttons.opts.hl = 'Function' + dashboard.section.buttons.opts.hl_shortcut = 'Type' + dashboard.opts.opts.noautocmd = true + + alpha.setup(dashboard.opts) + end, +} diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua new file mode 100644 index 00000000000..8184c00f125 --- /dev/null +++ b/lua/custom/plugins/bufferline.lua @@ -0,0 +1,17 @@ +return { + 'akinsho/bufferline.nvim', + version = '*', + dependencies = 'nvim-tree/nvim-web-devicons', + config = function() + require('bufferline').setup { + options = { + numbers = 'none', + diagnostics = 'nvim_lsp', + separator_style = 'slant' or 'padded_slant', + show_tab_indicators = true, + show_buffer_close_icons = false, + show_close_icon = false, + }, + } + end, +} diff --git a/lua/custom/plugins/dressing.lua b/lua/custom/plugins/dressing.lua new file mode 100644 index 00000000000..4ddecd80cde --- /dev/null +++ b/lua/custom/plugins/dressing.lua @@ -0,0 +1,11 @@ +return { + 'stevearc/dressing.nvim', + opts = {}, + config = function() + require('dressing').setup { + select = { + backend = { 'telescope', 'builtin' }, + }, + } + end, +} diff --git a/lua/custom/plugins/leap.lua b/lua/custom/plugins/leap.lua new file mode 100644 index 00000000000..a08511e7b2f --- /dev/null +++ b/lua/custom/plugins/leap.lua @@ -0,0 +1,8 @@ +return { + 'ggandor/leap.nvim', + keys = { 's', 'S' }, + config = function() + local leap = require 'leap' + leap.set_default_keymaps() + end, +} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 00000000000..4d20c7c73d8 --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -0,0 +1,100 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { + -- Useful for getting pretty icons, but requires a Nerd Font. + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + }, + config = function() + -- Color table for highlights + local colors = { + bg = '#202328', + fg = '#bbc2cf', + yellow = '#ECBE7B', + cyan = '#008080', + darkblue = '#081633', + green = '#98be65', + orange = '#FF8800', + violet = '#a9a1e1', + magenta = '#c678dd', + blue = '#51afef', + red = '#ec5f67', + } + + local function separator() + return '%=' + end + + local function lsp_client() + local buf_clients = vim.lsp.get_clients() + if next(buf_clients) == nil then + return '' + end + local buf_client_names = {} + for _, client in pairs(buf_clients) do + if client.name ~= 'null-ls' then + table.insert(buf_client_names, client.name) + end + end + return '[' .. table.concat(buf_client_names, ', ') .. ']' + end + + local function lsp_progress(_, is_active) + if not is_active then + return + end + local messages = vim.lsp.status() + if #messages == 0 then + return '' + end + local status = {} + for _, msg in pairs(messages) do + local title = '' + if msg.title then + title = msg.title + end + table.insert(status, (msg.percentage or 0) .. '%% ' .. title) + end + local spinners = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' } + local ms = vim.loop.hrtime() / 1000000 + local frame = math.floor(ms / 120) % #spinners + return table.concat(status, '  ') .. ' ' .. spinners[frame + 1] + end + + function setup() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'horizon', + component_separators = {}, + section_separators = {}, + disabled_filetypes = {}, + always_divide_middle = true, + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { + { separator }, + { lsp_client, icon = '', color = { fg = colors.violet, gui = 'bold' } }, + { lsp_progress }, + }, + lualine_x = { 'filename', 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = {}, + } + end + + return setup() + end, +} diff --git a/lua/custom/plugins/markdown-preview.lua b/lua/custom/plugins/markdown-preview.lua new file mode 100644 index 00000000000..b1591c3dfe5 --- /dev/null +++ b/lua/custom/plugins/markdown-preview.lua @@ -0,0 +1,8 @@ +return { + 'iamcco/markdown-preview.nvim', + cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + ft = { 'markdown' }, + build = function() + vim.fn['mkdp#util#install']() + end, +} diff --git a/lua/custom/plugins/marks.lua b/lua/custom/plugins/marks.lua new file mode 100644 index 00000000000..61ff86e13b0 --- /dev/null +++ b/lua/custom/plugins/marks.lua @@ -0,0 +1,6 @@ +return { + 'chentoast/marks.nvim', + config = function() + require('marks').setup {} + end, +} diff --git a/lua/custom/plugins/telescope-file-browser.lua b/lua/custom/plugins/telescope-file-browser.lua new file mode 100644 index 00000000000..2f0f46bcb73 --- /dev/null +++ b/lua/custom/plugins/telescope-file-browser.lua @@ -0,0 +1,4 @@ +return { + 'nvim-telescope/telescope-file-browser.nvim', + dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' }, +} diff --git a/lua/kickstart/plugins/cmp.lua b/lua/kickstart/plugins/cmp.lua index e9ed483b75f..d59cad2e97e 100644 --- a/lua/kickstart/plugins/cmp.lua +++ b/lua/kickstart/plugins/cmp.lua @@ -1,7 +1,6 @@ return { { -- Autocompletion 'hrsh7th/nvim-cmp', - event = 'InsertEnter', dependencies = { -- Snippet Engine & its associated nvim-cmp source { @@ -17,15 +16,21 @@ return { end)(), dependencies = { -- `friendly-snippets` contains a variety of premade snippets. - -- See the README about individual language/framework/plugin snippets: - -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, + -- See the README about individual language/framework/plugin snippets: + -- https://github.com/rafamadriz/friendly-snippets + { + 'rafamadriz/friendly-snippets', + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, }, + config = function() + require('luasnip').config.set_config { + history = false, + updateevents = 'TextChanged, TextChangedI', + } + end, }, 'saadparwaiz1/cmp_luasnip', @@ -34,6 +39,9 @@ return { -- into multiple repos for maintenance purposes. 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/cmp-nvim-lua', }, config = function() -- See `:help cmp` @@ -41,13 +49,61 @@ return { local luasnip = require 'luasnip' luasnip.config.setup {} + local kind_icons = { + Text = '', + Method = '', + Function = '', + Constructor = '', + Field = '', + Variable = '', + Class = 'ﴯ', + Interface = '', + Module = '', + Property = 'ﰠ', + Unit = '', + Value = '', + Enum = '', + Keyword = '', + Snippet = '', + Color = '', + File = '', + Reference = '', + Folder = '', + EnumMember = '', + Constant = '', + Struct = '', + Event = '', + Operator = '', + TypeParameter = '', + } + cmp.setup { snippet = { expand = function(args) luasnip.lsp_expand(args.body) end, }, - completion = { completeopt = 'menu,menuone,noinsert' }, + + preselect = cmp.PreselectMode.None, + experimental = { native_menu = false, ghost_text = false }, + + formatting = { + format = function(entry, vim_item) + -- Kind icons + vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind + -- Source + vim_item.menu = ({ + nvim_lsp = '[LSP]', + buffer = '[Buffer]', + luasnip = '[Snip]', + nvim_lua = '[Lua]', + treesitter = '[Treesitter]', + path = '[Path]', + nvim_lsp_signature_help = '[Signature]', + })[entry.source.name] + return vim_item + end, + }, -- For an understanding of why these mappings were -- chosen, you will need to read `:help ins-completion` @@ -98,6 +154,40 @@ return { end end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + if luasnip.expandable() then + luasnip.expand() + else + cmp.confirm { + select = true, + } + end + else + fallback() + end + end), + + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.locally_jumpable(1) then + luasnip.jump(1) + else + fallback() + end + end, { 'i', 's' }), + + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, @@ -111,7 +201,38 @@ return { { name = 'luasnip' }, { name = 'path' }, }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, } + + -- '/' cmdline setup. + cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' }, + }, + }) + + -- ':' cmdline setup. + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' }, + }, { + { + name = 'cmdline', + option = { + ignore_cmds = { 'Man', '!' }, + }, + }, + }), + }) + + -- Auto pairs + local cmp_autopairs = require 'nvim-autopairs.completion.cmp' + cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done { map_char = { tex = '' } }) end, }, } diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 6883db52cf7..0f6d9d13686 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -5,7 +5,7 @@ return { cmd = { 'ConformInfo' }, keys = { { - 'f', + 'F', function() require('conform').format { async = true, lsp_format = 'fallback' } end, @@ -34,7 +34,7 @@ return { 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 }, diff --git a/lua/kickstart/plugins/indent_line.lua b/lua/kickstart/plugins/indent-blankline.lua similarity index 100% rename from lua/kickstart/plugins/indent_line.lua rename to lua/kickstart/plugins/indent-blankline.lua diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index 92ec4cc0aad..c7c0bbc7be9 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -22,10 +22,6 @@ return { 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', - -- Useful status updates for LSP. - -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, - -- Allows extra capabilities provided by nvim-cmp 'hrsh7th/cmp-nvim-lsp', }, @@ -150,6 +146,9 @@ return { end, }) + -- Set LSP log level + vim.lsp.set_log_level 'off' + -- Change diagnostic symbols in the sign column (gutter) -- if vim.g.have_nerd_font then -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } @@ -177,10 +176,14 @@ return { -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, + -- Nix + rnix = {}, + -- Protobuf + buf_ls = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index 159971f00e7..b5306968e5e 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -50,9 +50,43 @@ return { -- Telescope picker. This is really useful to discover what Telescope can -- do as well as how to actually do it! + local actions = require 'telescope.actions' + local telescope = require 'telescope' + + local previewers = require 'telescope.previewers' + local Job = require 'plenary.job' + local preview_maker = function(filepath, bufnr, opts) + filepath = vim.fn.expand(filepath) + Job:new({ + command = 'file', + args = { '--mime-type', '-b', filepath }, + on_exit = function(j) + local mime_type = vim.split(j:result()[1], '/')[1] + + if mime_type == 'text' then + -- Check file size + vim.loop.fs_stat(filepath, function(_, stat) + if not stat then + return + end + if stat.size > 500000 then + return + else + previewers.buffer_previewer_maker(filepath, bufnr, opts) + end + end) + else + vim.schedule(function() + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { 'BINARY FILE' }) + end) + end + end, + }):sync() + end + -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` - require('telescope').setup { + telescope.setup { -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- @@ -61,17 +95,49 @@ return { -- i = { [''] = 'to_fuzzy_refine' }, -- }, -- }, - -- pickers = {} + defaults = { + buffer_previewer_maker = preview_maker, + mappings = { + i = { + [''] = actions.move_selection_next, + [''] = actions.move_selection_previous, + [''] = actions.cycle_history_next, + [''] = actions.cycle_history_prev, + }, + }, + }, + pickers = { + find_files = { + theme = 'ivy', + }, + git_files = { + theme = 'ivy', + }, + }, extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), }, + ['file_browser'] = { + theme = 'ivy', + -- disables netrw and use telescope-file-browser in its place + hijack_netrw = true, + mappings = { + ['i'] = { + -- your custom insert mode mappings + }, + ['n'] = { + -- your custom normal mode mappings + }, + }, + }, }, } -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') + pcall(require('telescope').load_extension 'file_browser') -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' @@ -84,7 +150,7 @@ return { vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) 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', 'sb', builtin.buffers, { desc = '[S] Search existing [B]uffers' }) -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() diff --git a/lua/kickstart/plugins/treesitter.lua b/lua/kickstart/plugins/treesitter.lua index b026245adf3..2f704c48b76 100644 --- a/lua/kickstart/plugins/treesitter.lua +++ b/lua/kickstart/plugins/treesitter.lua @@ -5,7 +5,7 @@ return { 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' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'rust', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index 26edb5074f6..784a4ed64c7 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -53,18 +53,29 @@ return { F12 = '', }, }, - - -- Document existing key chains - spec = { + }, + config = function() + require('which-key').add { + -- Document existing key chains { 'c', group = '[C]ode', mode = { 'n', 'x' } }, - { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, { 'w', group = '[W]orkspace' }, { 't', group = '[T]oggle' }, { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, - }, + -- Buffer + { 'b', group = '[B]uffer' }, + { 'bc', 'bd!', desc = '[C]lose current buffer' }, + { 'bh', 'bprev', desc = 'Switch to previous buffer' }, + { 'bl', 'bnext', desc = 'Switch to nex buffer' }, + -- File + { 'f', group = '[File]' }, + { 'fb', ':Telescope file_browser', desc = '[B]rowse files' }, + { 'fs', 'w', desc = '[S]ave file' }, + { 'fc', 'q', desc = '[C]lose file' }, + { 'fx', 'x', desc = 'Save and close file' }, + } + end, }, } -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/lazy-plugins.lua b/lua/lazy-plugins.lua index 9a10fc0e6c5..401c823ef37 100644 --- a/lua/lazy-plugins.lua +++ b/lua/lazy-plugins.lua @@ -20,7 +20,6 @@ require('lazy').setup({ -- Use `opts = {}` to force a plugin to be loaded. -- - -- modular approach: using `require 'path/name'` will -- include a plugin definition from file lua/path/name.lua @@ -40,7 +39,7 @@ require('lazy').setup({ require 'kickstart/plugins/todo-comments', - require 'kickstart/plugins/mini', + -- require 'kickstart/plugins/mini', require 'kickstart/plugins/treesitter', @@ -54,16 +53,16 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent-blankline', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/options.lua b/lua/options.lua index 94ee2ed6364..f4a059650a1 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -5,12 +5,11 @@ -- Make line numbers default vim.opt.number = true --- You can also add relative line numbers, to help with jumping. --- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true --- Enable mouse mode, can be useful for resizing splits for example! -vim.opt.mouse = 'a' +vim.opt.relativenumber = true + +-- Disable mouse mode +vim.opt.mouse = '' -- Don't show the mode, since it's already in the status line vim.opt.showmode = false @@ -37,7 +36,7 @@ vim.opt.smartcase = true vim.opt.signcolumn = 'yes' -- Decrease update time -vim.opt.updatetime = 250 +vim.opt.updatetime = 200 -- Decrease mapped sequence wait time -- Displays which-key popup sooner @@ -62,4 +61,26 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 --- vim: ts=2 sts=2 sw=2 et +-- Sets tab behavior +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 +vim.opt.expandtab = true + +-- Set buffer behavior +vim.opt.hidden = false + +-- Highlight on yank +vim.cmd [[ + augroup YankHighlight + autocmd! + autocmd TextYankPost * silent! lua vim.highlight.on_yank() + augroup end +]] + +-- Access system clipboard +vim.opt.clipboard = 'unnamedplus' + +-- Define file search behavior +vim.opt.wildignore:append '**/.git/*' +vim.opt.wildignore:append '**/build/*'