Update system. Changes in neovim config

This commit is contained in:
Mateusz Słodkowicz 2026-03-25 20:16:21 +01:00
parent bf522e0b25
commit 8eb8d54d93
Signed by: materus
SSH Key Fingerprint: SHA256:rzVduzTiiszuYfLPYD0SDZV+g8lxhpcRgpbOZA1X0Uo
5 changed files with 144 additions and 96 deletions

View File

@ -1,70 +1,2 @@
vim.opt.number = true MATERUS = {}
vim.opt.expandtab = true require("materus")
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.tabstop = 2
vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if vim.fn.executable("git") == 1 then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local opts = {}
local plugins = {
{
"Mofiqul/dracula.nvim",
lazy = false,
priority = 1000,
opts = {}
},
{
"romgrk/barbar.nvim",
init = function() vim.g.barbar_auto_setup = false end,
dependencies = {"nvim-tree/nvim-web-devicons","lewis6991/gitsigns.nvim"}
},
{
'nvim-telescope/telescope.nvim', version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
}
},
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
},
{
'lambdalisue/vim-suda'
},
--[[
{
"kevinhwang91/nvim-ufo",
dependencies = {"kevinhwang91/promise-async"},
opts = {}
}]]
}
require("lazy").setup(plugins, opts)
if vim.fn.executable("tree-sitter") == 1 then
require('nvim-treesitter').setup {
-- Directory to install parsers and queries to (prepended to `runtimepath` to have priority)
install_dir = vim.fn.stdpath('data') .. '/site',
highlight = {enable = true},
indent = { enable = true},
}
require('nvim-treesitter').install { 'lua' }
end
vim.cmd [[colorscheme dracula]]
end

View File

@ -0,0 +1,103 @@
vim.opt.number = true
vim.opt.expandtab = true
vim.opt.cursorline = true
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
vim.opt.tabstop = 2
vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }
--vim.g.cord_defer_startup = true
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if vim.fn.executable("git") == 1 then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local opts = {}
local plugins = {
{
"Mofiqul/dracula.nvim",
lazy = false,
priority = 1000,
opts = {}
},
{
"romgrk/barbar.nvim",
init = function() vim.g.barbar_auto_setup = false end,
dependencies = { "nvim-tree/nvim-web-devicons", "lewis6991/gitsigns.nvim" }
},
{
'lewis6991/gitsigns.nvim'
},
{
'nvim-telescope/telescope.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
}
},
{
'lambdalisue/vim-suda'
},
{
'vyfor/cord.nvim'
},
{
"dstein64/nvim-scrollview"
},
{
"Isrothy/neominimap.nvim",
version = "v3.x.x",
lazy = false,
init = function()
vim.opt.wrap = true
vim.opt.sidescrolloff = 36
vim.g.neominimap = {
auto_enable = false,
layout = "float",
click = {
enabled = true,
auto_switch_focus = false,
},
}
end,
},
--[[
{
"kevinhwang91/nvim-ufo",
dependencies = {"kevinhwang91/promise-async"},
opts = {}
}]]
}
require("lazy").setup(plugins, opts)
if vim.fn.executable("tree-sitter") == 1 and MATERUS.NIXOS ~= 1 then
table.insert(plugins, {
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
})
end
if vim.fn.executable("tree-sitter") == 1 and MATERUS.NIXOS ~= 1 then
require('nvim-treesitter').setup {
-- Directory to install parsers and queries to (prepended to `runtimepath` to have priority)
install_dir = vim.fn.stdpath('data') .. '/site',
highlight = { enable = true },
indent = { enable = true },
}
require('nvim-treesitter').install { 'lua' }
end
vim.cmd [[colorscheme dracula]]
end

48
flake.lock generated
View File

@ -92,11 +92,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773264488, "lastModified": 1774274588,
"narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=", "narHash": "sha256-dnHvv5EMUgTzGZmA+3diYjQU2O6BEpGLEOgJ1Qe9LaY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c", "rev": "cf9686ba26f5ef788226843bc31fda4cf72e373b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -114,11 +114,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773422513, "lastModified": 1774368172,
"narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=", "narHash": "sha256-Vdfo8+2SQhgc7i+TCIkBXzypQCFAvNrWvhUkZQtFGKE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056", "rev": "5068d0b03e8b2cfae58441775aa849b7028a3d39",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -178,11 +178,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773543606, "lastModified": 1774320235,
"narHash": "sha256-phMmtcMDGos4O82iEE3qFl58jp7fp1mu2liDE0A11gQ=", "narHash": "sha256-tZpmUgKhyxtJo/ZLtUd4p8tC8PCaK1iFigELD/EFZMw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "014e1925a28b3e53f90883530ce6ff80e2da238a", "rev": "d6064384db4f5383f5dc8a5dcba6d43495cffca6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -200,11 +200,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773543606, "lastModified": 1774320235,
"narHash": "sha256-phMmtcMDGos4O82iEE3qFl58jp7fp1mu2liDE0A11gQ=", "narHash": "sha256-tZpmUgKhyxtJo/ZLtUd4p8tC8PCaK1iFigELD/EFZMw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "014e1925a28b3e53f90883530ce6ff80e2da238a", "rev": "d6064384db4f5383f5dc8a5dcba6d43495cffca6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -286,11 +286,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1773389992, "lastModified": 1774106199,
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=", "narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda", "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -318,11 +318,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1773375660, "lastModified": 1774244481,
"narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=", "narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", "rev": "4590696c8693fea477850fe379a01544293ca4e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -384,11 +384,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773550941, "lastModified": 1774303811,
"narHash": "sha256-wa/++bL2QeMUreNFBZEWluQfOYB0MnQIeGNMuaX9sfs=", "narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c469b6885f0dcd5c7c56bd935a0f08dbcd9e79e1", "rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -406,11 +406,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773550941, "lastModified": 1774303811,
"narHash": "sha256-wa/++bL2QeMUreNFBZEWluQfOYB0MnQIeGNMuaX9sfs=", "narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c469b6885f0dcd5c7c56bd935a0f08dbcd9e79e1", "rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -27,6 +27,7 @@
packwiz packwiz
ani-cli ani-cli
mpv mpv
kitty
libreoffice-qt6-fresh libreoffice-qt6-fresh

View File

@ -16,9 +16,21 @@ isHm:
if isHm then if isHm then
# Home Manager # Home Manager
lib.mkIf config.mkk.neovim.enable { lib.mkIf config.mkk.neovim.enable {
xdg.configFile."nvim/init.lua".source = "${config.mkk.dir}/config/editor/neovim/init.lua"; xdg.configFile."nvim/lua/materus".source = "${config.mkk.dir}/config/editor/neovim/lua/materus";
programs.neovim = {
enable = true;
plugins = [
pkgs.vimPlugins.nvim-treesitter.withAllGrammars
];
extraLuaConfig = lib.mkAfter ''
MATERUS = {
NIXOS = 1
}
require("materus")
'';
};
home.packages = [ home.packages = [
pkgs.neovim
pkgs.fd pkgs.fd
pkgs.ripgrep pkgs.ripgrep
pkgs.tree-sitter pkgs.tree-sitter