some nvim updates
This commit is contained in:
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-- 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)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "deus" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
21
.config/nvim/lua/config/options.lua
Normal file
21
.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
-- Basic settings
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.expandtab = true
|
||||
vim.o.smartindent = true
|
||||
vim.o.wrap = false
|
||||
vim.o.cursorline = true
|
||||
vim.o.termguicolors = true
|
||||
vim.o.ruler = true
|
||||
vim.o.visualbell = true
|
||||
vim.o.modelines = 0
|
||||
vim.o.colorcolumn = '+1,100,120'
|
||||
vim.o.hidden = true
|
||||
vim.o.showmode = true
|
||||
|
||||
-- Syntax highlighting and filetype plugins
|
||||
vim.cmd('syntax enable')
|
||||
vim.cmd('filetype plugin indent on')
|
11
.config/nvim/lua/plugins/completion.lua
Normal file
11
.config/nvim/lua/plugins/completion.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Autocompletion system
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source for nvim-cmp
|
||||
"hrsh7th/cmp-buffer", -- Buffer source
|
||||
"hrsh7th/cmp-path", -- Path source
|
||||
"L3MON4D3/LuaSnip", -- Snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippet source
|
||||
},
|
||||
}
|
4
.config/nvim/lua/plugins/deus.lua
Normal file
4
.config/nvim/lua/plugins/deus.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Color scheme
|
||||
return {
|
||||
"theniceboy/nvim-deus"
|
||||
}
|
9
.config/nvim/lua/plugins/lspconfig.lua
Normal file
9
.config/nvim/lua/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Language Server Protocol support
|
||||
return {
|
||||
"neovim/nvim-lspconfig", -- Base LSP configurations
|
||||
dependencies = {
|
||||
-- Server installation manager
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
}
|
2
.config/nvim/lua/plugins/plenary.lua
Normal file
2
.config/nvim/lua/plugins/plenary.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Utility functions
|
||||
return {"nvim-lua/plenary.nvim"}
|
5
.config/nvim/lua/plugins/telescope.lua
Normal file
5
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Fuzzy finder
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
}
|
5
.config/nvim/lua/plugins/tree.lua
Normal file
5
.config/nvim/lua/plugins/tree.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- File explorer
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
6
.config/nvim/lua/plugins/treesitter.lua
Normal file
6
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Treesitter for syntax highlighting (load early)
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
priority = 100, -- Load early
|
||||
}
|
4
.config/nvim/lua/plugins/which-key.lua
Normal file
4
.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Key binding helper
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
}
|
Reference in New Issue
Block a user