nixops ok now
parent
a0dae5b3a0
commit
97fd1543df
|
@ -10,7 +10,6 @@
|
||||||
-- - zk @ https://github.com/mickael-menu/zk
|
-- - zk @ https://github.com/mickael-menu/zk
|
||||||
-- - prettierd @ npm install -g @fsouza/prettierd
|
-- - prettierd @ npm install -g @fsouza/prettierd
|
||||||
|
|
||||||
local data_dir = vim.fn.stdpath('data')
|
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||||
let plug_path = data_dir . '/autoload/plug.vim'
|
let plug_path = data_dir . '/autoload/plug.vim'
|
||||||
|
@ -24,11 +23,6 @@ local function truthy(v) return v ~= nil end
|
||||||
|
|
||||||
local function cfg(cfg_var, do_fn) if truthy(cfg_var) then do_fn() end end
|
local function cfg(cfg_var, do_fn) if truthy(cfg_var) then do_fn() end end
|
||||||
|
|
||||||
local function cfg_render(do_fn)
|
|
||||||
local should_render = not truthy(os.getenv("NVIM_HEADLESS"))
|
|
||||||
cfg(should_render, do_fn)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- vim-plug
|
-- vim-plug
|
||||||
local Plug = vim.fn['plug#']
|
local Plug = vim.fn['plug#']
|
||||||
|
|
||||||
|
@ -87,7 +81,6 @@ Plug('kylechui/nvim-surround') -- surrounds with tags/parenthesis
|
||||||
Plug('simrat39/rust-tools.nvim') -- config rust-analyzer and nvim integration
|
Plug('simrat39/rust-tools.nvim') -- config rust-analyzer and nvim integration
|
||||||
|
|
||||||
-- UI & colorscheme
|
-- UI & colorscheme
|
||||||
cfg_render(function()
|
|
||||||
Plug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
Plug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
||||||
Plug('gruvbox-community/gruvbox') -- theme provider
|
Plug('gruvbox-community/gruvbox') -- theme provider
|
||||||
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
||||||
|
@ -95,7 +88,6 @@ cfg_render(function()
|
||||||
Plug('kyazdani42/nvim-web-devicons') -- icons for folder and filetypes
|
Plug('kyazdani42/nvim-web-devicons') -- icons for folder and filetypes
|
||||||
Plug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
Plug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
||||||
Plug('folke/todo-comments.nvim') -- Highlights TODO
|
Plug('folke/todo-comments.nvim') -- Highlights TODO
|
||||||
end)
|
|
||||||
|
|
||||||
-- other utilities
|
-- other utilities
|
||||||
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||||
|
@ -139,30 +131,52 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
vim.cmd([[
|
vim.g.gruvbox_contrast_dark="soft";
|
||||||
set ignorecase
|
vim.g.gruvbox_contrast_light="soft";
|
||||||
set smartcase
|
vim.opt.ignorecase = true;
|
||||||
set incsearch
|
vim.opt.smartcase = true;
|
||||||
set number relativenumber
|
vim.opt.incsearch = true;
|
||||||
set tabstop=4 softtabstop=4
|
vim.opt.number = true;
|
||||||
set autoindent
|
vim.opt.relativenumber = true;
|
||||||
set smartindent
|
vim.opt.autoindent = true;
|
||||||
set expandtab
|
vim.opt.smartindent = true;
|
||||||
set shiftwidth=4
|
vim.opt.expandtab = true;
|
||||||
set exrc
|
vim.opt.exrc = true;
|
||||||
set incsearch
|
|
||||||
set scrolloff=30
|
vim.opt.tabstop = 4;
|
||||||
set signcolumn=yes
|
vim.opt.softtabstop = 4;
|
||||||
set colorcolumn=80
|
vim.opt.shiftwidth = 4;
|
||||||
set background=light
|
vim.opt.scrolloff = 30;
|
||||||
]])
|
vim.opt.signcolumn = "yes";
|
||||||
|
vim.opt.colorcolumn = "80";
|
||||||
|
|
||||||
|
vim.opt.background = "light";
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('Dark', function(opts)
|
||||||
|
-- opts: {name, args: str, fargs: Splited<str>, range, ...}
|
||||||
|
---@type string
|
||||||
|
local contrast = (opts.args and string.len(opts.args) > 0) and opts.args or vim.g.gruvbox_contrast_dark;
|
||||||
|
vim.g.gruvbox_contrast_dark = contrast;
|
||||||
|
vim.opt.background = "dark";
|
||||||
|
end,
|
||||||
|
{nargs = "?";})
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('Light', function(opts)
|
||||||
|
-- opts: {name, args: str, fargs: Splited<str>, range, ...}
|
||||||
|
---@type string
|
||||||
|
local contrast = (opts.args and string.len(opts.args) > 0) and opts.args or vim.g.gruvbox_contrast_dark;
|
||||||
|
vim.g.gruvbox_contrast_light = contrast;
|
||||||
|
vim.opt.background = "light";
|
||||||
|
end,
|
||||||
|
{nargs = "?";})
|
||||||
|
|
||||||
vim.opt.lazyredraw = true
|
vim.opt.lazyredraw = true
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
-- some plugins misbehave when we do swap files
|
-- some plugins misbehave when we do swap files
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
vim.opt.undodir = vim.fn.stdpath('state')..'/.vim/undodir'
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.completeopt = 'menuone,noselect'
|
vim.opt.completeopt = 'menuone,noselect'
|
||||||
-- vim.opt.clipboard = "unnamedplus"
|
-- vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
|
@ -136,11 +136,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1673683108,
|
"lastModified": 1673746461,
|
||||||
"narHash": "sha256-zg1W14wyrOCKiTkXU+nGHf/EfqX6wtcUWcMo4O/Q6nY=",
|
"narHash": "sha256-Y21pbVNlPWPokXFbngSahnxeCff0LX+LKdDktEBIVm4=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "e89c39d6f016a4140293755250e968e839009617",
|
"rev": "6134c1e8a39a5e61d0593613343a5923a86e3545",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -157,11 +157,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673684013,
|
"lastModified": 1673770422,
|
||||||
"narHash": "sha256-ljfG17g9K5sl7DGounCwOIfQLOGzXF0ffuDGxo3UN1E=",
|
"narHash": "sha256-hYVEUzvqobxAM2FZfWTrTLKKNfkOSfsm0uGqNoSiIvw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "85b0900729bffa5e0d1817bbc6f024916dc1f38e",
|
"rev": "fd8e5953cfeada345d7daeedce6ab0919f1284d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -177,11 +177,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673365945,
|
"lastModified": 1673752441,
|
||||||
"narHash": "sha256-/duo8kCEbo62D5gn46m//jfvRtT56KS5dy+j6+Rl+4Y=",
|
"narHash": "sha256-/g4ImZWV05CrXRWTSJsda6ztIp7LAPxs2L6RCrbQ66U=",
|
||||||
"owner": "mic92",
|
"owner": "mic92",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "0e51ff44d6bef0b6b2bbf9e34fdc029fc24820fc",
|
"rev": "391180f77505c1c8cdd45fe1a59dc89d3e40300a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -288,11 +288,11 @@
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673662873,
|
"lastModified": 1673749717,
|
||||||
"narHash": "sha256-/YOtiDKPUXKKpIhsAds11llfC42ScGW27bbHnNZebco=",
|
"narHash": "sha256-hgrw8w/AThRWfVafx3EO3/TQlGcUou4nui8X47cVhXo=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "90163bbbadce526f8b248a5fe545b06c59597108",
|
"rev": "aab6eb2dfc7a1e42d94b6f24ef13639ff8544af4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -37,7 +37,7 @@ in
|
||||||
# pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
# pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
||||||
# pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
# pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
||||||
pkgs.mosh # Parsec for SSH
|
pkgs.mosh # Parsec for SSH
|
||||||
# pkgs.nixops_unstable # nixops v2 # insecure for now
|
pkgs.nixops_unstable # nixops v2 # insecure for now
|
||||||
pkgs.lynx # Web browser at your local terminal
|
pkgs.lynx # Web browser at your local terminal
|
||||||
pkgs.zk
|
pkgs.zk
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue