This commit is contained in:
2025-10-11 22:41:24 +05:00
parent d0401c8c07
commit aaf079c4f4
20 changed files with 357 additions and 0 deletions

8
nvim/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

15
nvim/.neoconf.json Normal file
View File

@@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

23
nvim/init.lua Normal file
View File

@@ -0,0 +1,23 @@
-- 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.termguicolors = true
-- Load default configs
require("config.lazy")
require("config.options")
require("config.binds")

21
nvim/lazy-lock.json Normal file
View File

@@ -0,0 +1,21 @@
{
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
"barbar.nvim": { "branch": "master", "commit": "549ee11d97057eae207bafa2c23c315942cca097" },
"base16-nvim": { "branch": "master", "commit": "0f2863e28d66a65129b6a277e0652736f9ad4fad" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lua-language-server": { "branch": "master", "commit": "24b9faa66332fca9f0df6e552ae9f3ca24c01821" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "3e89e4973d784e1c966517e528b3a30395403fa7" },
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }
}

View File

@@ -0,0 +1,5 @@
vim.keymap.set('n', 'mn', ':Neotree dir=./', { desc = "Open NeoTree" })
vim.keymap.set('n', 'mt', ':ToggleTerm size=15', { desc = "Terminal" })

12
nvim/lua/config/lazy.lua Normal file
View File

@@ -0,0 +1,12 @@
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
require("lazy").setup({
spec = {
{ import = "plugins" },
},
checker = {
enabled = true,
notify = false,
},
})

View File

@@ -0,0 +1,39 @@
-- Нумерация строки
vim.opt.number = true
-- Табуляция
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
-- Подсветка текущей строки
vim.opt.cursorline = true
-- Прокрутка
vim.opt.scrolloff = 5
vim.opt.sidescrolloff = 5
vim.opt.list = true
vim.opt.listchars = {
tab = '',
trail = '·',
nbsp = '',
extends = '',
precedes = ''
}
vim.opt.fillchars = { eob = " " }
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.incsearch = true
vim.opt.hlsearch = true
vim.opt.wrapscan = true
vim.opt.inccommand = "split"
-- Выкл netrw для nvim-tree
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.barbar_auto_setup = false

View File

@@ -0,0 +1,9 @@
return {
{
'goolord/alpha-nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require'alpha'.setup(require'alpha.themes.startify'.config)
end
},
}

View File

@@ -0,0 +1,8 @@
return {
{
"m4xshen/autoclose.nvim",
config = function()
require("autoclose").setup()
end
},
}

View File

@@ -0,0 +1,17 @@
return {
{
"romgrk/barbar.nvim",
config = function()
require('barbar').setup({
animation = true,
auto_hide = true,
tabpages = true,
clickable = true,
focus_on_close = 'left',
highlight_alternate = false,
highlight_inactive_file_icons = false,
highlight_visible = true,
})
end
}
}

View File

@@ -0,0 +1,34 @@
return {
{
"RRethy/base16-nvim",
config = function()
require('base16-colorscheme').setup({
base00 = '#1d1d1d',
base01 = '#2a2a2a',
base02 = '#303030',
base03 = '#606060', -- comments 383838
base04 = '#9a9996',
base05 = '#c0bfbc',
base06 = '#deddda',
base07 = '#f6f5f4',
base08 = '#ed333b',
base09 = '#ff7800',
base0A = '#ffa348',
base0B = '#57e389',
base0C = '#5bc8af',
base0D = '#62a0ea',
base0E = '#dc8add',
base0F = '#f66151',
})
require('base16-colorscheme').with_config({
telescope = true,
indentblankline = true,
notify = true,
ts_rainbow = true,
cmp = true,
illuminate = true,
dapui = true,
})
end
}
}

View File

@@ -0,0 +1,8 @@
return {
{
"norcalli/nvim-colorizer.lua",
config = function()
require'colorizer'.setup()
end
},
}

9
nvim/lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,9 @@
return {
{
"neovim/nvim-lspconfig",
config = function()
require'lspconfig'.nil_ls.setup{}
end
},
{ "LuaLS/lua-language-server" }
}

View File

@@ -0,0 +1,67 @@
return {
{
"nvim-lualine/lualine.nvim",
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup({
options = {
globalstatus = true,
icons_enabled = true,
always_divide_middle = true,
theme = 'base16',
component_separators = { left = '', right = '', },
section_separators = {left = '', right = '', },
},
sections = {
lualine_a = {
{
"mode",
separator = { left = "", right = "" },
padding = 1,
},
},
lualine_b = {
{
"diagnostics",
separator = { right = "" },
color = { bg = "#404040" },
padding = 1.2,
sections = {
"error",
"warn",
"hint",
},
},
},
lualine_c = {
'buffers',
'diff'
},
lualine_x = {
'encoding',
'progress'
},
lualine_y = {
{
'fileformat',
separator = { left = "", right = "" },
padding = 1.2,
},
{
'hostname',
padding = {
left = 0.1,
right = 1.8,
},
},
{
'lsp_status',
padding = 2,
},
},
lualine_z = {''},
},
})
end
}
}

View File

@@ -0,0 +1,12 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
lazy = false,
},
}

View File

@@ -0,0 +1,20 @@
return {
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = function()
require("noice").setup({
notify = {
enabled = false,
},
messages = {
enabled = false,
},
})
end
},
}

View File

@@ -0,0 +1,8 @@
return {
{
"nvim-telescope/telescope.nvim",
config = function()
require('telescope').setup()
end
},
}

View File

@@ -0,0 +1,10 @@
return {
{
"akinsho/toggleterm.nvim",
version = "*",
config = true,
config = function()
require('toggleterm').setup()
end
},
}

View File

@@ -0,0 +1,29 @@
return {
{ "nvim-treesitter/nvim-treesitter",
branch = 'master',
lazy = false,
build = ":TSUpdate",
config = function()
require'nvim-treesitter.configs'.setup({
ensure_installed = {
"nix",
"yuck",
"css",
"scss",
"javascript",
"go",
"json",
"lua",
"c",
"cpp",
},
auto_install = true,
ignore_install = {},
hightlight = {
enable = true,
disable = {},
},
})
end
}
}

View File

@@ -0,0 +1,3 @@
return {
{ "elkowar/yuck.vim" }
}