Archived
Watch
1
0
Fork
You've already forked nixos
0

neovim babey

This commit is contained in:
asnev 2026-07-04 18:48:15 +07:00
commit f58cee9df3
Signed by: asnev
SSH key fingerprint: SHA256:8hagYq9hDUuS5clQ78FKhIoQDvg5crdkYMHX+3g7wB4
21 changed files with 402 additions and 107 deletions

View file

@ -16,10 +16,29 @@
├── default.nix
├── dotfiles
│   ├── fastfetch.jsonc
│   ├── helix-languages.toml
│   ├── helix.toml
│   └── vimrc
│   ├── helix
│   │   ├── helix-languages.toml
│   │   └── helix.toml
│   ├── nvim
│   │   ├── init.lua
│   │   ├── LICENSE
│   │   ├── lua
│   │   │   ├── config
│   │   │   │   ├── autocmds.lua
│   │   │   │   ├── keymaps.lua
│   │   │   │   ├── lazy.lua
│   │   │   │   └── options.lua
│   │   │   └── plugins
│   │   │   └── example.lua
│   │   ├── README.md
│   │   └── stylua.toml
│   └── vim
│   ├── vim-lisp
│   ├── vimrc
│   ├── vim-tab2
│   ├── vim-tab4
│   └── vim-tabs
└── home.nix
7 directories, 14 files
13 directories, 27 files
```

View file

@ -34,7 +34,6 @@
alsa.support32Bit = false; # temporarily set to 'false' to fix openblas issue
pulse.enable = true;
};
flatpak.enable = true;
};
security.rtkit.enable = true;
@ -56,7 +55,6 @@
traceroute rlwrap entr
# extra utils
fd bat xh tlrc dust hyperfine ripgrep fzf eza
unstable.lazygit
];
shellAliases = {
l = "eza --long --all";
@ -66,11 +64,9 @@
};
programs = {
fish = {
enable = true;
package = pkgs.unstable.fish;
generateCompletions = false;
};
fish.enable = true;
starship.enable = true;
atuin = { enable = true; settings.sync_address = "https://api.atuin.sh"; };
nix-ld = {
enable = true;
libraries = with pkgs; [
@ -78,14 +74,6 @@
e2fsprogs
];
};
starship = {
enable = true;
package = pkgs.unstable.starship;
};
atuin = {
enable = true;
settings.sync_address = "https://api.atuin.sh";
};
tmux = {
enable = true;
clock24 = true;
@ -109,20 +97,11 @@
fonts = {
packages = with pkgs; [
# GUI fonts
inter
corefonts
vista-fonts
roboto
cantarell-fonts
inter corefonts vista-fonts roboto cantarell-fonts
# fonts for i18n
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
noto-fonts-monochrome-emoji
unifont
unifont_upper
unifont-csur
noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif
noto-fonts-color-emoji noto-fonts-monochrome-emoji
unifont unifont_upper unifont-csur
# terminal fonts
nerd-fonts.iosevka
];
@ -135,8 +114,6 @@
xdg.portal = {
enable = true;
config.common.default = ["gtk"];
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
];
extraPortals = with pkgs; [xdg-desktop-portal-wlr];
};
}

View file

@ -18,9 +18,14 @@ in {
environment = {
systemPackages = with pkgs; [
# system utils
unzip imagemagick ghostscript tectonic mermaid-cli
# programming
biwascheme chicken guile sbcl
python3 lua gcc clang chicken guile sbcl nodejs
unstable.racket
# devel
ast-grep luarocks stylua
unstable.lazygit
# LSPs
ty nil marksman systemd-lsp bash-language-server
];
@ -29,6 +34,7 @@ in {
programs = {
starship = {
package = pkgs.unstable.starship;
transientPrompt.enable = true;
transientPrompt.left = "starship module character";
settings = {

View file

@ -0,0 +1,6 @@
[[language]]
name = "scheme"
[language.indent]
tab-width = 2
unit = " "

View file

@ -0,0 +1,21 @@
theme = "gruvbox"
[editor]
bufferline = "multiple"
cursorline = true
gutters = []
[editor.statusline.mode]
normal = "NORMAL"
insert = "INSERT"
select = "SELECT"
[editor.indent-guides]
render = true
skip-levels = 2
[editor.soft-wrap]
enable = true
[editor.lsp]
display-messages = true

View file

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

View file

@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

View file

@ -0,0 +1,8 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")

View file

@ -0,0 +1,3 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here

View file

@ -0,0 +1,53 @@
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({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View file

@ -0,0 +1,3 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here

View file

@ -0,0 +1,8 @@
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
}
}
}

View file

@ -0,0 +1,197 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").lsp.on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, {
function()
return "😄"
end,
})
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
}

View file

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

View file

@ -0,0 +1,10 @@
setlocal expandtab
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2
setlocal lisp
setlocal autoindent
setlocal showmatch
setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letre,cond

View file

@ -0,0 +1,4 @@
setlocal expandtab
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2

View file

@ -0,0 +1,4 @@
setlocal expandtab
setlocal tabstop=4
setlocal shiftwidth=4
setlocal softtabstop=4

View file

@ -0,0 +1,4 @@
setlocal tabstop=4
setlocal shiftwidth=4
setlocal noexpandtab

View file

@ -0,0 +1,32 @@
set nocompatible
set encoding=utf-8
set backspace=indent,eol,start
set clipboard=unnamedplus
set mouse=a
set history=1000
set updatetime=300
syntax on
set ruler
set showcmd
set showmode
set laststatus=1
set wildmenu
set wildmode=longest,list,full
set ttyfast
set lazyredraw
filetype plugin indent on
set autoindent
set smartindent
set expandtab
set smarttab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch

View file

@ -1,45 +0,0 @@
set nocompatible
set encoding=utf-8
set backspace=indent,eol,start
set clipboard=unnamedplus
set mouse=a
set history=1000
set updatetime=300
syntax on
set ruler
set showcmd
set showmode
set laststatus=1
set wildmenu
set wildmode=longest,list,full
set ttyfast
set lazyredraw
filetype plugin indent on
set autoindent
set smartindent
set expandtab
set smarttab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
augroup LispIndent
autocmd!
autocmd FileType lisp,clojure,scheme,racket setlocal lisp autoindent showmatch expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType lisp,clojure,scheme,racket setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letrec,cond
augroup END
augroup LanguageIndent
autocmd!
autocmd FileType javascript,typescript,html,css,json,nix setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab
autocmd FileType python,rust setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
autocmd FileType go,make setlocal tabstop=4 shiftwidth=4 noexpandtab
augroup END

Some files were not shown because too many files have changed in this diff Show more