commit a45634929a7376eed38084df3600b15dd087d9fb from: amb date: Sun Apr 12 19:45:19 2026 UTC Use nvim builtin plugin manager, simplify config, drop ALL lsp support commit - bf840df110ae936c819968c0cfc01f6fb2f79e18 commit + a45634929a7376eed38084df3600b15dd087d9fb blob - 4567260ba3167a66581ecae885726e23ff7f6ffb blob + a6a83dd235791e8a1aa27433a5981451ecc75781 --- init.lua +++ init.lua @@ -1,18 +1,3 @@ -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' - -require('plugins.lazy') - -require('lazy').setup({ - require('plugins/telescope'), - require('plugins/mason'), - require('plugins/lspconfig'), - require('plugins/conform'), - -- require('plugins/mini'), - -- require('plugins/autopairs'), - require('plugins/gitsigns'), -}) - -require('config.options') -require('config.colors') -require('config.keymaps') +require('options') +require('colors') +require('keymaps') blob - 49c44a44f791ad1bfa7d312e8d21602e9dd62ed7 (mode 644) blob + /dev/null --- lazy-lock.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, - "gitsigns.nvim": { "branch": "main", "commit": "0a80125bace82d82847d40bc2c38a22d62c6dc2d" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" }, - "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, - "nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" }, - "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" } -} blob - 5b1250e1b84c5600ec3fb07f2f93526c50c945f8 (mode 644) blob + /dev/null --- lua/config/colors.lua +++ /dev/null @@ -1,28 +0,0 @@ -vim.opt.termguicolors = true - -vim.api.nvim_set_hl(0, "Normal", { fg = "#d5c494", bg = "#252525" }) -vim.api.nvim_set_hl(0, "Comment", { fg = "#948967", italic = true }) - -vim.api.nvim_set_hl(0, "TelescopeMatching", { fg = "#a99c76" }) -vim.api.nvim_set_hl(0, "Visual", { bg = "#474032" }) - -local groups = { - "Constant", "Identifier", "Statement", "PreProc", "Type", "Special", - "String", "Character", "Number", "Boolean", "Float", "Function", - "Conditional", "Repeat", "Label", "Operator", "Keyword", "Exception", - "Include", "Define", "Macro", "PreCondit", "StorageClass", "Structure", - "Typedef", "Delimiter", "Underlined", "Error", "Todo", "netrwDir", "@variable", - "GitSignsAdd", "GitSignsChange", "GitSignsDelete", "GitSignsStagedAdd", - "GitSignsStagedChange", "GitSignsStagedDelete" -} - -for _, group in ipairs(groups) do - vim.api.nvim_set_hl(0, group, { link = "Normal" }) -end - -vim.api.nvim_create_autocmd("FileType", { - pattern = "*", - callback = function(a) - pcall(vim.treesitter.stop, a.buf) - end, -}) blob - 8ae962a221f4c7b574f9a42b5a610e3dfaee3f32 (mode 644) blob + /dev/null --- lua/config/keymaps.lua +++ /dev/null @@ -1,78 +0,0 @@ --- Clear highlights on search when pressing in normal mode --- See `:help hlsearch` -vim.keymap.set('n', '', 'nohlsearch') - --- Faster netrw mapping --- See `:help netrw` -vim.keymap.set('n', 'e', ':Ex') - --- Diagnostic keymaps -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) - --- Disable arrow keys in normal mode -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') -vim.keymap.set('n', '', '') - --- Keybinds to make split navigation easier. --- Use CTRL+ to switch between windows --- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) - --- Telescope keymaps --- See `:help telescope.builtin` -vim.keymap.set('n', 'sf', 'Telescope find_files', { desc = 'Find files' }) -vim.keymap.set('n', 'sg', 'Telescope live_grep', { desc = 'Search text in files' }) -vim.keymap.set('n', 'sb', 'Telescope buffers', { desc = 'List open buffers' }) -vim.keymap.set('n', 'st', 'Telescope help_tags', { desc = 'Search help tags' }) -vim.keymap.set('n', 'sh', 'Telescope git_bcommits', { desc = 'List git history' }) - --- Conform (external plugin) bind -vim.keymap.set({ 'n', 'x' }, 'f', function() - require('conform').format({ async = true, lsp_fallback = false }) -end, { desc = 'Format the current buffer' }) - --- LSP keymaps (set on LspAttach) -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', { clear = true }), - callback = function(event) - local lsp_map = function(keys, func, desc, mode) - mode = mode or 'n' - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) - end - - -- Core navigation - lsp_map('gd', require('telescope.builtin').lsp_definitions, 'Go to Definition') - lsp_map('gD', vim.lsp.buf.declaration, 'Go to Declaration') - lsp_map('gt', vim.lsp.buf.type_definition, 'Go to Type Definition') - lsp_map('gi', require('telescope.builtin').lsp_implementations, 'Go to Implementation') - lsp_map('gr', require('telescope.builtin').lsp_references, 'Get References') - lsp_map('K', vim.lsp.buf.hover, 'Show hover documentation') - - -- Leader-based LSP actions (under l for less frequent actions) - lsp_map('lr', vim.lsp.buf.rename, 'Rename across multiple files', 'n') - lsp_map('ca', vim.lsp.buf.code_action, 'Code actions', { 'n', 'x' }) - lsp_map('lt', require('telescope.builtin').lsp_type_definitions, 'Type Definition') - end, -}) - --- Gitsigns -vim.api.nvim_create_autocmd('BufEnter', { - group = vim.api.nvim_create_augroup('GitSignsConfig', { clear = true }), - callback = function(event) - local gs_map = function(keys, func, desc, mode) - mode = mode or 'n' - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'GitSigns: ' .. desc }) - end - - local gitsigns = require('gitsigns') - - gs_map('b', gitsigns.blame_line, 'toggle git show blame line') - gs_map('tb', gitsigns.toggle_current_line_blame, 'toggle git show blame line') - gs_map('td', gitsigns.toggle_deleted, 'Toggle git show deleted') - end, -}) blob - f5aee344cf5e31c84c553a0fe2c66c456d5c6b07 (mode 644) blob + /dev/null --- lua/config/options.lua +++ /dev/null @@ -1,77 +0,0 @@ -vim.o.number = false -vim.o.relativenumber = false - -vim.opt.expandtab = true -- Use spaces instead of tabs -vim.opt.shiftwidth = 4 -- Number of spaces to insert for indentation -vim.opt.tabstop = 4 -- Display width of tabs (doesn't affect actual indentation) -vim.opt.softtabstop = 4 -- Number of spaces for key to insert (for convenience) - --- Don't show the mode, since it's already in the status line -vim.o.showmode = false - --- Sync clipboard between OS and Neovim. -vim.o.clipboard = 'unnamedplus' - --- Enable break indent -vim.o.breakindent = true - --- Save undo history -vim.o.undofile = true - --- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -vim.o.ignorecase = true -vim.o.smartcase = true - --- Keep signcolumn on (required by gitsigns) -vim.o.signcolumn = 'yes' - --- Decrease update time -vim.o.updatetime = 100 - --- Decrease mapped sequence wait time -vim.o.timeoutlen = 300 - --- Configure how new splits should be opened -vim.o.splitright = true -vim.o.splitbelow = true - --- Sets how neovim will display certain whitespace characters in the editor. -vim.o.list = true -vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '␣' } - --- Preview substitutions live, as you type! -vim.o.inccommand = 'split' - --- Minimal number of screen lines to keep above and below the cursor. -vim.o.scrolloff = 10 - --- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), --- instead raise a dialog asking if you wish to save the current file(s) --- See `:help 'confirm'` -vim.o.confirm = true - --- Make netrw simpler -vim.g.netrw_banner = 0 - --- Amount of lines to scroll -vim.opt.scroll = 10 - --- This is done to sync terminal background with neovim background --- effectively hiding the padding --- MiniMisc.setup_termbg_sync() - --- Remove mouse menu (spawnable on MOUSE2) -vim.cmd('aunmenu PopUp') -vim.api.nvim_create_augroup('nvim_popupmenu', { clear = true }) - --- Remove the gigantic status bar and the command padding -vim.opt.laststatus = 0 -vim.opt.statusline = "%#WinSeparator#" -vim.opt.fillchars:append({ - stl = '─', - stlnc = '─' -}) - --- Keep the ruller to the essential -vim.opt.rulerformat = '%l,%c' -vim.opt.shortmess:append("I") blob - /dev/null blob + 222bfdf24b890a48ccd0860fb41eb6aa2287d948 (mode 644) --- /dev/null +++ lua/colors.lua @@ -0,0 +1,28 @@ +vim.opt.termguicolors = true + +vim.api.nvim_set_hl(0, "Normal", { fg = "#d5c494", bg = "#090909" }) +vim.api.nvim_set_hl(0, "Comment", { fg = "#948967", italic = true }) + +vim.api.nvim_set_hl(0, "TelescopeMatching", { fg = "#a99c76" }) +vim.api.nvim_set_hl(0, "Visual", { bg = "#474032" }) + +local groups = { + "Constant", "Identifier", "Statement", "PreProc", "Type", "Special", + "String", "Character", "Number", "Boolean", "Float", "Function", + "Conditional", "Repeat", "Label", "Operator", "Keyword", "Exception", + "Include", "Define", "Macro", "PreCondit", "StorageClass", "Structure", + "Typedef", "Delimiter", "Underlined", "Error", "Todo", "netrwDir", "@variable", + "GitSignsAdd", "GitSignsChange", "GitSignsDelete", "GitSignsStagedAdd", + "GitSignsStagedChange", "GitSignsStagedDelete" +} + +for _, group in ipairs(groups) do + vim.api.nvim_set_hl(0, group, { link = "Normal" }) +end + +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function(a) + pcall(vim.treesitter.stop, a.buf) + end, +}) blob - 2106204c41fc83f410a733fb20f822cdcc7bf6d3 (mode 644) blob + /dev/null --- lua/plugins/autopairs.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'windwp/nvim-autopairs', - event = 'InsertEnter', - opts = {}, -} blob - 30d4a1174a7064671689f69e9530194f22e103bf (mode 644) blob + /dev/null --- lua/plugins/conform.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - { - 'stevearc/conform.nvim', - cmd = { 'ConformInfo' }, - opts = { - notify_on_error = true, - formatters_by_ft = { - go = { 'gofmt' }, - htmlangular = { 'prettier' }, - typescript = { 'prettier' }, - javascript = { 'prettier' }, - python = { 'black' }, - php = { 'pretty-php' }, - }, - }, - }, -} blob - 4489f96080dc6029fcfbf24a804e62ad560b86c1 (mode 644) blob + /dev/null --- lua/plugins/gitsigns.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 0, - ignore_whitespace = false, - virt_text_priority = 100, - use_focus = true, - }, - current_line_blame_formatter = ', - ', - }, -} blob - 25523869af3986209d2421e9c188b113222da7ef (mode 644) blob + /dev/null --- lua/plugins/lazy.lua +++ /dev/null @@ -1,15 +0,0 @@ -local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = 'https://github.com/folke/lazy.nvim.git' - local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { 'Failed to clone lazy.nvim:\n', 'ErrorMsg' }, - { out, 'WarningMsg' }, - { '\nPress any key to exit...' }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.runtimepath:prepend(lazypath) blob - e5cdbf0691c1284c43a7007c0546d4031fea1480 (mode 644) blob + /dev/null --- lua/plugins/lspconfig.lua +++ /dev/null @@ -1,51 +0,0 @@ -return { - { - 'neovim/nvim-lspconfig', - dependencies = { - { 'williamboman/mason.nvim', config = true }, - { 'williamboman/mason-lspconfig.nvim' }, - }, - config = function() - vim.diagnostic.config({ - signs = false, - severity_sort = true, - float = { border = 'rounded', source = 'if_many' }, - underline = { severity = vim.diagnostic.severity.ERROR }, - virtual_text = { - source = 'if_many', - spacing = 1, - format = function(diagnostic) - local diagnostic_message = { - [vim.diagnostic.severity.ERROR] = diagnostic.message, - [vim.diagnostic.severity.WARN] = diagnostic.message, - [vim.diagnostic.severity.INFO] = diagnostic.message, - [vim.diagnostic.severity.HINT] = diagnostic.message, - } - return diagnostic_message[diagnostic.severity] - end, - }, - }) - -- custom LSP configs are define here - local servers = { - lua_ls = { - settings = { - Lua = { - diagnostics = { globals = { 'vim' } }, - workspace = { checkThirdParty = false }, - telemetry = { enable = false }, - }, - }, - }, - } - for server_name, server_config in pairs(servers) do - vim.lsp.config( - server_name, - vim.tbl_deep_extend('force', { - capabilities = capabilities, - }, server_config) - ) - vim.lsp.enable(server_name) - end - end, - }, -} blob - 05fa8a986d71425b2af3100106a62d9f036aa202 (mode 644) blob + /dev/null --- lua/plugins/mason.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - opts = {}, - }, - { - 'williamboman/mason-lspconfig.nvim', - opts = {}, - } -} blob - d435f4c2ca827dfb9e79b71288b6440ff6c96a4e (mode 644) blob + /dev/null --- lua/plugins/mini.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - { - 'echasnovski/mini.nvim', - config = function() - -- Better Around/Inside textobjects - -- - -- - 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() - require('mini.misc').setup() - end, - }, -} blob - c530db5c47631077ec2c7d3b880b89e3fa12ee83 (mode 644) blob + /dev/null --- lua/plugins/telescope.lua +++ /dev/null @@ -1,62 +0,0 @@ -return { - 'nvim-telescope/telescope.nvim', - branch = 'master', - dependencies = { - 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-ui-select.nvim' }, - { - -- Builds fzf-native if make is avaliable. - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'make', - - cond = function() - return vim.fn.executable('make') == 1 - end, - }, - }, - cmd = 'Telescope', - config = function() - pcall(require('telescope').load_extension, 'fzf') - pcall(require('telescope').load_extension, 'ui-select') - require('telescope').setup({ - defaults = { - layout_strategy = 'horizontal', - file_ignore_patterns = { - 'node_modules', - '^package%-lock%.json$', - '__init__.py', - }, - mappings = { - i = { - [''] = 'move_selection_next', - [''] = 'move_selection_previous', - [''] = 'close', - }, - n = { - ['q'] = 'close', - }, - }, - }, - pickers = { - find_files = { - layout_config = { - height = 0.4, - width = 0.4, - prompt_position = 'top', - }, - previewer = false, - }, - live_grep = { - layout_config = { - prompt_position = 'top', - }, - }, - }, - extensions = { - ['ui-select'] = { - require('telescope.themes').get_dropdown(), - }, - }, - }) - end, -} blob - /dev/null blob + af397be4a879e1d5889b2043866d9773e34b9047 (mode 644) --- /dev/null +++ lua/keymaps.lua @@ -0,0 +1,81 @@ +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +-- Clear highlights on search when pressing in normal mode +-- See `:help hlsearch` +vim.keymap.set('n', '', 'nohlsearch') + +-- Faster netrw mapping +-- See `:help netrw` +vim.keymap.set('n', 'e', ':Ex') + +-- Diagnostic keymaps +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) + +-- Disable arrow keys in normal mode +vim.keymap.set('n', '', '') +vim.keymap.set('n', '', '') +vim.keymap.set('n', '', '') +vim.keymap.set('n', '', '') + +-- Keybinds to make split navigation easier. +-- Use CTRL+ to switch between windows +-- See `:help wincmd` for a list of all window commands +vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) + +-- Telescope keymaps +-- See `:help telescope.builtin` +vim.keymap.set('n', 'sf', 'Telescope find_files', { desc = 'Find files' }) +vim.keymap.set('n', 'sg', 'Telescope live_grep', { desc = 'Search text in files' }) +vim.keymap.set('n', 'sb', 'Telescope buffers', { desc = 'List open buffers' }) +vim.keymap.set('n', 'st', 'Telescope help_tags', { desc = 'Search help tags' }) +vim.keymap.set('n', 'sh', 'Telescope git_bcommits', { desc = 'List git history' }) + +-- Conform (external plugin) bind +vim.keymap.set({ 'n', 'x' }, 'f', function() + require('conform').format({ async = true, lsp_fallback = false }) +end, { desc = 'Format the current buffer' }) + +-- LSP keymaps (set on LspAttach) +vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('UserLspConfig', { clear = true }), + callback = function(event) + local lsp_map = function(keys, func, desc, mode) + mode = mode or 'n' + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) + end + + -- Core navigation + lsp_map('gd', require('telescope.builtin').lsp_definitions, 'Go to Definition') + lsp_map('gD', vim.lsp.buf.declaration, 'Go to Declaration') + lsp_map('gt', vim.lsp.buf.type_definition, 'Go to Type Definition') + lsp_map('gi', require('telescope.builtin').lsp_implementations, 'Go to Implementation') + lsp_map('gr', require('telescope.builtin').lsp_references, 'Get References') + lsp_map('K', vim.lsp.buf.hover, 'Show hover documentation') + + -- Leader-based LSP actions (under l for less frequent actions) + lsp_map('lr', vim.lsp.buf.rename, 'Rename across multiple files', 'n') + lsp_map('ca', vim.lsp.buf.code_action, 'Code actions', { 'n', 'x' }) + lsp_map('lt', require('telescope.builtin').lsp_type_definitions, 'Type Definition') + end, +}) + +-- Gitsigns +vim.api.nvim_create_autocmd('BufEnter', { + group = vim.api.nvim_create_augroup('GitSignsConfig', { clear = true }), + callback = function(event) + local gs_map = function(keys, func, desc, mode) + mode = mode or 'n' + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'GitSigns: ' .. desc }) + end + + local gitsigns = require('gitsigns') + + gs_map('b', gitsigns.blame_line, 'toggle git show blame line') + gs_map('tb', gitsigns.toggle_current_line_blame, 'toggle git show blame line') + gs_map('td', gitsigns.toggle_deleted, 'Toggle git show deleted') + end, +}) blob - /dev/null blob + f5aee344cf5e31c84c553a0fe2c66c456d5c6b07 (mode 644) --- /dev/null +++ lua/options.lua @@ -0,0 +1,77 @@ +vim.o.number = false +vim.o.relativenumber = false + +vim.opt.expandtab = true -- Use spaces instead of tabs +vim.opt.shiftwidth = 4 -- Number of spaces to insert for indentation +vim.opt.tabstop = 4 -- Display width of tabs (doesn't affect actual indentation) +vim.opt.softtabstop = 4 -- Number of spaces for key to insert (for convenience) + +-- Don't show the mode, since it's already in the status line +vim.o.showmode = false + +-- Sync clipboard between OS and Neovim. +vim.o.clipboard = 'unnamedplus' + +-- Enable break indent +vim.o.breakindent = true + +-- Save undo history +vim.o.undofile = true + +-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term +vim.o.ignorecase = true +vim.o.smartcase = true + +-- Keep signcolumn on (required by gitsigns) +vim.o.signcolumn = 'yes' + +-- Decrease update time +vim.o.updatetime = 100 + +-- Decrease mapped sequence wait time +vim.o.timeoutlen = 300 + +-- Configure how new splits should be opened +vim.o.splitright = true +vim.o.splitbelow = true + +-- Sets how neovim will display certain whitespace characters in the editor. +vim.o.list = true +vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '␣' } + +-- Preview substitutions live, as you type! +vim.o.inccommand = 'split' + +-- Minimal number of screen lines to keep above and below the cursor. +vim.o.scrolloff = 10 + +-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), +-- instead raise a dialog asking if you wish to save the current file(s) +-- See `:help 'confirm'` +vim.o.confirm = true + +-- Make netrw simpler +vim.g.netrw_banner = 0 + +-- Amount of lines to scroll +vim.opt.scroll = 10 + +-- This is done to sync terminal background with neovim background +-- effectively hiding the padding +-- MiniMisc.setup_termbg_sync() + +-- Remove mouse menu (spawnable on MOUSE2) +vim.cmd('aunmenu PopUp') +vim.api.nvim_create_augroup('nvim_popupmenu', { clear = true }) + +-- Remove the gigantic status bar and the command padding +vim.opt.laststatus = 0 +vim.opt.statusline = "%#WinSeparator#" +vim.opt.fillchars:append({ + stl = '─', + stlnc = '─' +}) + +-- Keep the ruller to the essential +vim.opt.rulerformat = '%l,%c' +vim.opt.shortmess:append("I") blob - /dev/null blob + 6371fac130d15b90e0f51eb90f043bf00c6b3c6d (mode 644) --- /dev/null +++ nvim-pack-lock.json @@ -0,0 +1,28 @@ +{ + "plugins": { + "conform.nvim": { + "rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395", + "src": "https://github.com/stevearc/conform.nvim" + }, + "gitsigns.nvim": { + "rev": "8d82c240f190fc33723d48c308ccc1ed8baad69d", + "src": "https://github.com/lewis6991/gitsigns.nvim" + }, + "plenary.nvim": { + "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", + "src": "https://github.com/nvim-lua/plenary.nvim" + }, + "telescope-fzf-native.nvim": { + "rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c", + "src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, + "telescope-ui-select.nvim": { + "rev": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2", + "src": "https://github.com/nvim-telescope/telescope-ui-select.nvim" + }, + "telescope.nvim": { + "rev": "f7c673b8e46e8f233ff581d3624a517d33a7e264", + "src": "https://github.com/nvim-telescope/telescope.nvim" + } + } +} blob - b876ff7f0d14267737d1104029577ff58a5b62f3 (mode 644) blob + /dev/null --- plugins/gitsigns.lua +++ /dev/null @@ -1,22 +0,0 @@ -vim.pack.add({ - 'https://github.com/lewis6991/gitsigns.nvim', -}) - -require('gitsigns').setup { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 0, - ignore_whitespace = false, - virt_text_priority = 100, - use_focus = true, - }, - current_line_blame_formatter = ', - ', -} blob - f8e68073ce24d294c601556b11dea6837cea8e3c (mode 644) blob + /dev/null --- plugins/telescope.lua +++ /dev/null @@ -1,7 +0,0 @@ -vim.pack.add({ - 'https://github.com/nvim-lua/plenary.nvim' - 'https://github.com/nvim-telescope/telescope-ui-select.nvim' - 'https://github.com/nvim-telescope/telescope-fzf-native.nvim' - 'https://github.com/nvim-telescope/telescope.nvim' -}) - blob - /dev/null blob + 8f819bddf9d3baad1332b5ed5a274ff5874bc859 (mode 644) --- /dev/null +++ plugin/conform.lua @@ -0,0 +1,15 @@ +vim.pack.add({ + 'https://github.com/stevearc/conform.nvim', +}) + +require('conform').setup { + notify_on_error = true, + formatters_by_ft = { + go = { 'gofmt' }, + htmlangular = { 'prettier' }, + typescript = { 'prettier' }, + javascript = { 'prettier' }, + python = { 'black' }, + php = { 'pretty-php' }, + }, +} blob - /dev/null blob + b876ff7f0d14267737d1104029577ff58a5b62f3 (mode 644) --- /dev/null +++ plugin/gitsigns.lua @@ -0,0 +1,22 @@ +vim.pack.add({ + 'https://github.com/lewis6991/gitsigns.nvim', +}) + +require('gitsigns').setup { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 0, + ignore_whitespace = false, + virt_text_priority = 100, + use_focus = true, + }, + current_line_blame_formatter = ', - ', +} blob - /dev/null blob + 28e3ab962c170e893e10d096b7e812ecc18e2122 (mode 644) --- /dev/null +++ plugin/telescope.lua @@ -0,0 +1,50 @@ +vim.pack.add({ + 'https://github.com/nvim-lua/plenary.nvim', + 'https://github.com/nvim-telescope/telescope-ui-select.nvim', + 'https://github.com/nvim-telescope/telescope-fzf-native.nvim', + 'https://github.com/nvim-telescope/telescope.nvim', +}) + +pcall(require('telescope').load_extension, 'fzf') +pcall(require('telescope').load_extension, 'ui-select') + +require('telescope').setup{ + defaults = { + layout_strategy = 'horizontal', + file_ignore_patterns = { + 'node_modules', + '^package%-lock%.json$', + '__init__.py', + }, + mappings = { + i = { + [''] = 'move_selection_next', + [''] = 'move_selection_previous', + [''] = 'close', + }, + n = { + ['q'] = 'close', + }, + }, + }, + pickers = { + find_files = { + layout_config = { + height = 0.4, + width = 0.4, + prompt_position = 'top', + }, + previewer = false, + }, + live_grep = { + layout_config = { + prompt_position = 'top', + }, + }, + }, + extensions = { + ['ui-select'] = { + require('telescope.themes').get_dropdown(), + }, + }, +}