stuff
This commit is contained in:
parent
2cc1ad23a7
commit
ff832f2270
3 changed files with 123 additions and 2 deletions
99
hosts/nixvm/config/nvim/init.lua
Normal file
99
hosts/nixvm/config/nvim/init.lua
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
-- 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)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin" },
|
||||||
|
{ "williamboman/mason.nvim", opts = {} },
|
||||||
|
{ "williamboman/mason-lspconfig.nvim", opts = {} },
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
{ "jay-babu/mason-nvim-dap.nvim", opts = {} },
|
||||||
|
{"nvim-treesitter/nvim-treesitter", lazy = false, branch = "main", build = ":TSUpdate", opts = {}},
|
||||||
|
{ "nvim-tree/nvim-tree.lua", opts = {} },
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"romgrk/barbar.nvim",
|
||||||
|
{ "nvim-lualine/lualine.nvim", opts = {} },
|
||||||
|
{ "windwp/nvim-autopairs", opts = {} },
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
"hrsh7th/vim-vsnip",
|
||||||
|
"voldikss/vim-floaterm",
|
||||||
|
{
|
||||||
|
'IogaMaster/neocord',
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.tabstop = 2
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.smarttab = true
|
||||||
|
vim.o.cursorline = true
|
||||||
|
vim.o.laststatus = 3
|
||||||
|
vim.o.background = "dark"
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
vim.o.number = true
|
||||||
|
vim.o.relativenumber = true
|
||||||
|
vim.cmd.colorscheme "catppuccin-mocha"
|
||||||
|
vim.o.guifont = "CaskaydiaCove Nerd Font:h11"
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true, -- Show inline error messages
|
||||||
|
signs = true, -- Show signs in the gutter
|
||||||
|
underline = true, -- Underline errors
|
||||||
|
update_in_insert = false,
|
||||||
|
severity_sort = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
local cmp = require'cmp'
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.fn["vsnip#anonymous"](args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'vsnip' },
|
||||||
|
}, {
|
||||||
|
{ name = 'buffer' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
function (server_name)
|
||||||
|
require("lspconfig")[server_name].setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -114,6 +114,12 @@
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
services.spice-vdagentd.enable = true;
|
services.spice-vdagentd.enable = true;
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 2d";
|
||||||
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,12 @@
|
||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "25.05";
|
home.file = {
|
||||||
|
".config/nvim/init.lua" = {
|
||||||
|
enable = true;
|
||||||
|
source = ./config/nvim/init.lua;
|
||||||
|
};
|
||||||
|
};
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|
@ -19,4 +23,16 @@
|
||||||
};
|
};
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
};
|
};
|
||||||
|
programs.starship.enable = true;
|
||||||
|
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
themeFile = "Catppuccin-Mocha";
|
||||||
|
font = {
|
||||||
|
name = "Inconsolata Nerd Font";
|
||||||
|
package = pkgs.nerd-fonts.inconsolata;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "25.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue