Update neovim

This commit is contained in:
Andrew Haynes
2026-03-07 13:48:54 -05:00
parent 57b150d64a
commit 79c25033cb
5 changed files with 78 additions and 47 deletions
+71 -19
View File
@@ -1,28 +1,36 @@
vim.opt.termguicolors = true
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", "https://github.com/folke/lazy.nvim.git", lazypath })
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable",
"https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ "folke/tokyonight.nvim", lazy = false,
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
},
{ "norcalli/nvim-colorizer.lua" },
{ "mbbill/undotree" },
{ "nvim-mini/mini.pairs", version = '*' },
{ "nvim-mini/mini.surround", version = '*' },
{ "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" } },
{ "saghen/blink.cmp", version = "v1.*", opts = {} },
{ dir = "/Users/andrew/personal/Projects/Lua/polydev/",
{ "nvim-mini/mini.pairs", version = '*' },
{ "nvim-mini/mini.surround", version = '*' },
{ "ibhagwan/fzf-lua", dependencies = { "nvim-tree/nvim-web-devicons" } },
{ "saghen/blink.cmp", version = "v1.*", opts = {} },
{
dir = "/Users/andrew/personal/Projects/Lua/polydev/",
opts = {
terminal = {
mode = "split",
}
} },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", branch = "master",
}
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
branch = "master",
config = function()
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
@@ -30,10 +38,42 @@ require("lazy").setup({
})
end
},
-- {
-- "mfussenegger/nvim-lint",
-- event = {
-- "BufReadPre",
-- "BufNewFile",
-- },
-- config = function()
-- local lint = require("lint")
--
-- lint.linters_by_ft = {
-- c = { "clangtidy" },
-- }
--
-- local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
--
-- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
-- group = lint_augroup,
-- callback = function()
-- lint.try_lint()
-- end,
-- })
--
-- vim.keymap.set("n", "<leader>l", function()
-- lint.try_lint()
-- end, { desc = "Trigger linting for current file" })
-- -- Customizing the linter arguments
-- local clangtidy = lint.linters.clangtidy
-- clangtidy.args = {
-- "-p", "build", -- Tell clang-tidy to look in the build folder for compile_commands.json
-- }
-- end,
-- }
}
})
require ('colorizer').setup()
require('colorizer').setup()
require('mini.pairs').setup()
require('mini.surround').setup()
require("fzf-lua").setup({
@@ -44,15 +84,15 @@ require("fzf-lua").setup({
},
},
winopts = {
height = 0.50,
width = 0.45,
row = 0.35,
col = 0.50,
border = "rounded",
backdrop = 0,
fullscreen = false,
preview = {
hidden = true,
height = 0.50,
width = 0.45,
row = 0.35,
col = 0.50,
border = "rounded",
backdrop = 0,
fullscreen = false,
preview = {
hidden = true,
},
},
grep = {
@@ -73,6 +113,7 @@ vim.opt.relativenumber = true
vim.opt.wrap = false
vim.opt.swapfile = false
vim.opt.signcolumn = "yes"
vim.opt.undofile = true -- Keeps undo history even after we close a file
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
vim.opt.hlsearch = false
@@ -80,6 +121,16 @@ vim.opt.completeopt = { "menuone", "noselect", "popup" }
vim.g.netrw_browse_split = 0
vim.g.netrw_banner = 0
vim.g.netrw_winsize = 25
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { "screenline", "number" } -- cursorline look
vim.opt.shortmess =
'aF' -- abbreviates messages and prevents file name being echoed when opened
vim.opt.ignorecase = true -- ignore cases when searching
vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled
vim.opt.smartindent = true -- smarter indentation
vim.opt.smarttab = true -- make tab behaviour smarter
vim.opt.laststatus = 3
vim.cmd.colorscheme("tokyonight-moon")
vim.lsp.enable({ "lua_ls", "clangd" })
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
@@ -93,6 +144,7 @@ vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "<leader>ff", vim.lsp.buf.format)
vim.keymap.set("n", "<leader>vs", ":vsplit<CR>")
vim.keymap.set("n", "<leader>ss", ":split<CR>")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("x", "<leader>p", [["_dP]])