lazy-nvim migration with basic plugins

This commit is contained in:
pfych 2025-02-21 18:38:25 +11:00
parent b02e4dda6c
commit e2a8848a27
7 changed files with 109 additions and 75 deletions

View file

@ -15,86 +15,16 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
-- Basic Vim config
vim.cmd("autocmd!")
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
vim.scriptencoding = 'utf-8'
vim.opt.encoding = 'utf-8'
vim.opt.fileencoding = 'utf-8'
vim.wo.relativenumber = true
vim.wo.number = true
vim.opt.title = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.smarttab = true
vim.opt.expandtab = true
vim.opt.breakindent = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.mouse = "a"
vim.opt.undofile = true
vim.opt.undodir = vim.fn.expand('~/.vim/undodir')
vim.opt.wrap = true
vim.opt.linebreak = true
vim.opt.breakindent = true
vim.opt.breakindentopt = "shift:2,min:40,sbr"
-- Plugin setup
require("lazy").setup({
spec = {
{
"catppuccin/nvim",
name = "catppuccin",
lazy = false,
priority = 1000
},
{ "neovim/nvim-lspconfig" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" }
},
install = {},
spec = { { import = "plugins" } },
install = { colorscheme = { "catppuccin" } },
checker = { enabled = true }
})
-- Colour setup
require("catppuccin").setup({
flavour = "mocha", -- latte, frappe, macchiato, mocha
background = {
light = "latte",
dark = "mocha",
},
transparent_background = false,
no_italic = false,
no_bold = false,
styles = {
comments = { "italic" },
},
color_overrides = {},
integrations = {
cmp = true,
},
})
-- General vim
require("base")
vim.cmd('colorscheme catppuccin')
vim.api.nvim_set_hl(0, "Normal", { guibg = NONE, ctermbg = NONE })
-- LSP Setup
local nvim_lsp = require("lspconfig")
local capabilities = require('cmp_nvim_lsp').default_capabilities()
nvim_lsp.lua_ls.setup {
capabilities = capabilities,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false
},
},
},
}