Skip to content

Instantly share code, notes, and snippets.

@davidrjonas
Last active April 1, 2026 20:41
Show Gist options
  • Select an option

  • Save davidrjonas/7c3ce36eb19a1dfa73bc5ce38b53b53c to your computer and use it in GitHub Desktop.

Select an option

Save davidrjonas/7c3ce36eb19a1dfa73bc5ce38b53b53c to your computer and use it in GitHub Desktop.
Neovim 0.12 lazy to vim.pack
vim.g.mapleader = ','
-- global options
vim.opt.dir = '/tmp'
vim.opt.hidden = true
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.laststatus = 2
vim.opt.list = true
vim.opt.smartcase = true
vim.opt.swapfile = true
vim.opt.spell = true
vim.opt.spelllang = 'en_us'
vim.opt.mouse = ''
vim.opt.wrap = true
vim.o.shiftwidth = 4
vim.o.tabstop = 4
vim.bo.expandtab = true
vim.o.background = 'dark'
-- window-local options
vim.wo.number = false
vim.wo.wrap = false
vim.wo.foldenable = false
vim.pack.add({
-- Color Schemes
'https://github.com/datsfilipe/vesper.nvim',
'https://github.com/ellisonleao/gruvbox.nvim',
'https://github.com/mhartington/oceanic-next',
'https://github.com/nyoom-engineering/oxocarbon.nvim',
'https://github.com/ramojus/mellifluous.nvim',
'https://github.com/rebelot/kanagawa.nvim',
'https://github.com/savq/melange-nvim',
'https://github.com/sjl/badwolf',
-- UI
'https://github.com/folke/snacks.nvim',
'https://github.com/j-hui/fidget.nvim',
'https://github.com/lewis6991/gitsigns.nvim',
'https://github.com/nvim-lualine/lualine.nvim',
'https://github.com/nvim-tree/nvim-web-devicons', -- lualine dependency
'https://github.com/rachartier/tiny-inline-diagnostic.nvim',
-- Behaviors
'https://github.com/ethanholz/nvim-lastplace',
'https://github.com/rafamadriz/friendly-snippets', -- blink.cmp dependency
'https://github.com/stevearc/conform.nvim',
{ src = 'https://github.com/kylechui/nvim-surround', version = vim.version.range('^4.0.0') },
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('^1.0.0') },
-- LSP Configuration and Setup
'https://github.com/mason-org/mason-lspconfig.nvim',
'https://github.com/mason-org/mason.nvim', -- mason-lspconfig dependency
'https://github.com/neovim/nvim-lspconfig', -- mason-lspconfig sets the command
-- Language Integrations
{ src = 'https://github.com/saecki/crates.nvim', version = 'stable' },
{ src = 'https://github.com/mrcjkb/rustaceanvim', version = vim.version.range('^8') },
})
require('fidget').setup()
require('lualine').setup()
require('tiny-inline-diagnostic').setup()
require('nvim-lastplace').setup()
require('crates').setup()
require('mason').setup()
require('mason-lspconfig').setup({ ensure_installed = { 'perlnavigator', 'phpactor', 'basedpyright' }})
require('snacks').setup({
explorer = { enabled = true },
picker = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
words = { enabled = true },
})
require('gitsigns').setup({
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
})
require('conform').setup({
formatters_by_ft = {
rust = { 'rustfmt', lsp_format = 'fallback' },
php = { 'php_cs_fixer', lsp_format = 'fallback' },
},
format_on_save = {}
})
require('blink.cmp').setup({
signature = { enabled = true },
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
providers = {
lsp = {
score_offset = 1000,
},
},
},
completion = {
list = { selection = { preselect = false, auto_insert = true } },
ghost_text = { enabled = true },
},
cmdline = {
enabled = false,
completion = { menu = { auto_show = true } },
keymap = {
preset = 'default',
['<Up>'] = {'fallback'},
['<Down>'] = {'fallback'},
},
},
keymap = {
preset = 'default',
['<CR>'] = { 'accept', 'fallback' },
['<esc>'] = {
function(cmp)
if cmp.get_selected_item() ~= nil then
return cmp.cancel()
end
end,
'fallback',
},
['<Tab>'] = {
function(cmp)
if cmp.snippet_active() then return cmp.accept()
else return cmp.select_next() end
end,
'snippet_forward',
'fallback'
},
['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
}
})
require('gruvbox').setup({
invert_signs = true,
contrast = 'hard',
overrides = {
SignColumn = { bg = '#1d2021' }
}
})
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
options = { noremap = true }
vim.keymap.set('v', '>', '>gv', options)
vim.keymap.set('v', '<', '<gv', options)
vim.keymap.set('n', '<Leader>i', ':e ~/.config/nvim<CR>', options)
vim.keymap.set('n', '<Leader>x', ':%s/\\s\\+$//g<CR>', options)
vim.keymap.set('n', '<Leader>b', ':b#<CR>', options)
vim.keymap.set('n', '<Leader>z', '1z=', options)
vim.keymap.set('n', '<Leader>c', ':copen<CR>', options)
vim.keymap.set('n', '<Leader>n', ':cne<CR>', options)
vim.keymap.set('n', '<Leader>p', ':cprev<CR>', options)
vim.keymap.set('n', '<Leader>s', Snacks.picker.smart, options)
vim.keymap.set('n', '<Leader><Leader>', Snacks.picker.explorer, options)
vim.keymap.set('n', '<Leader>f', Snacks.picker.files, options)
--vim.keymap.set('n', '<Leader>a', vim.lsp.buf.code_action, options) -- use gra
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, options)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, options)
vim.keymap.set('n', '<Leader>h', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, options)
vim.keymap.set('t', '<Esc><Esc>', [[<C-\><C-n>]], options)
--vim.keymap.set('n', '<leader>f', tel.find_files, options)
--vim.keymap.set('n', '<leader>g', tel.live_grep, options)
--vim.keymap.set('n', '<leader>l', tel.buffers, options)
--vim.keymap.set('n', '<leader>fh', tel.help_tags, options)
--vim.keymap.set('n', '<leader>q', tel.quickfix, options)
--vim.keymap.set('n', '<leader>d', tel.diagnostics, options)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
require("mellifluous").setup({
--colorset = 'alduin',
--colorset = 'mountain',
--colorset = 'tender',
--colorset = 'kanagawa_dragon',
})
--vim.cmd.colorscheme('badwolf')
--vim.cmd.colorscheme('gruvbox')
--vim.cmd.colorscheme('kanagawa')
vim.cmd.colorscheme('kanagawa-dragon')
--vim.cmd.colorscheme('kanagawa-wave')
--vim.cmd.colorscheme('mellifluous')
--vim.cmd.colorscheme('vesper')
--vim.cmd.colorscheme('oxocarbon')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment