Skip to content

Instantly share code, notes, and snippets.

@davidrjonas
Last active August 21, 2025 20:50
Show Gist options
  • Save davidrjonas/14e8b9ef3406e42d986bd5b079dbc584 to your computer and use it in GitHub Desktop.
Save davidrjonas/14e8b9ef3406e42d986bd5b079dbc584 to your computer and use it in GitHub Desktop.
-- Bootstrap lazy.nvim
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.rtp:prepend(lazypath)
vim.opt.mouse = ''
vim.o.background = 'dark'
require("lazy").setup({
{'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, opts = {}},
{'lewis6991/gitsigns.nvim'},
-- See what the LSP is doing in the lower right corner
{ 'j-hui/fidget.nvim', opts = {} },
-- show diagnostics inline without making a mess
{"rachartier/tiny-inline-diagnostic.nvim", event = "VeryLazy", priority = 1000, opts = {}},
-- lsp configuration and setup
{'mason-org/mason-lspconfig.nvim',
dependencies = {
{"mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
opts = {
ensure_installed = { "perlnavigator", "phpactor" }
}
},
-- autocomplete
{
"saghen/blink.cmp",
version = "1.*",
dependencies = {
"rafamadriz/friendly-snippets",
},
opts = {
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' },
}
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment