nixops ok now
parent
a0dae5b3a0
commit
97fd1543df
|
@ -10,7 +10,6 @@
|
|||
-- - zk @ https://github.com/mickael-menu/zk
|
||||
-- - prettierd @ npm install -g @fsouza/prettierd
|
||||
|
||||
local data_dir = vim.fn.stdpath('data')
|
||||
vim.cmd([[
|
||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.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_render(do_fn)
|
||||
local should_render = not truthy(os.getenv("NVIM_HEADLESS"))
|
||||
cfg(should_render, do_fn)
|
||||
end
|
||||
|
||||
-- vim-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
|
||||
|
||||
-- UI & colorscheme
|
||||
cfg_render(function()
|
||||
Plug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
||||
Plug('gruvbox-community/gruvbox') -- theme provider
|
||||
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('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
||||
Plug('folke/todo-comments.nvim') -- Highlights TODO
|
||||
end)
|
||||
|
||||
-- other utilities
|
||||
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||
|
@ -139,30 +131,52 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
|||
})
|
||||
|
||||
|
||||
vim.cmd([[
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
set number relativenumber
|
||||
set tabstop=4 softtabstop=4
|
||||
set autoindent
|
||||
set smartindent
|
||||
set expandtab
|
||||
set shiftwidth=4
|
||||
set exrc
|
||||
set incsearch
|
||||
set scrolloff=30
|
||||
set signcolumn=yes
|
||||
set colorcolumn=80
|
||||
set background=light
|
||||
]])
|
||||
vim.g.gruvbox_contrast_dark="soft";
|
||||
vim.g.gruvbox_contrast_light="soft";
|
||||
vim.opt.ignorecase = true;
|
||||
vim.opt.smartcase = true;
|
||||
vim.opt.incsearch = true;
|
||||
vim.opt.number = true;
|
||||
vim.opt.relativenumber = true;
|
||||
vim.opt.autoindent = true;
|
||||
vim.opt.smartindent = true;
|
||||
vim.opt.expandtab = true;
|
||||
vim.opt.exrc = true;
|
||||
|
||||
vim.opt.tabstop = 4;
|
||||
vim.opt.softtabstop = 4;
|
||||
vim.opt.shiftwidth = 4;
|
||||
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.termguicolors = true
|
||||
vim.opt.cursorline = true
|
||||
-- some plugins misbehave when we do swap files
|
||||
vim.opt.swapfile = 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.completeopt = 'menuone,noselect'
|
||||
-- vim.opt.clipboard = "unnamedplus"
|
||||
|
|
|
@ -136,11 +136,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1673683108,
|
||||
"narHash": "sha256-zg1W14wyrOCKiTkXU+nGHf/EfqX6wtcUWcMo4O/Q6nY=",
|
||||
"lastModified": 1673746461,
|
||||
"narHash": "sha256-Y21pbVNlPWPokXFbngSahnxeCff0LX+LKdDktEBIVm4=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "e89c39d6f016a4140293755250e968e839009617",
|
||||
"rev": "6134c1e8a39a5e61d0593613343a5923a86e3545",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -157,11 +157,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673684013,
|
||||
"narHash": "sha256-ljfG17g9K5sl7DGounCwOIfQLOGzXF0ffuDGxo3UN1E=",
|
||||
"lastModified": 1673770422,
|
||||
"narHash": "sha256-hYVEUzvqobxAM2FZfWTrTLKKNfkOSfsm0uGqNoSiIvw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "85b0900729bffa5e0d1817bbc6f024916dc1f38e",
|
||||
"rev": "fd8e5953cfeada345d7daeedce6ab0919f1284d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -177,11 +177,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673365945,
|
||||
"narHash": "sha256-/duo8kCEbo62D5gn46m//jfvRtT56KS5dy+j6+Rl+4Y=",
|
||||
"lastModified": 1673752441,
|
||||
"narHash": "sha256-/g4ImZWV05CrXRWTSJsda6ztIp7LAPxs2L6RCrbQ66U=",
|
||||
"owner": "mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "0e51ff44d6bef0b6b2bbf9e34fdc029fc24820fc",
|
||||
"rev": "391180f77505c1c8cdd45fe1a59dc89d3e40300a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -288,11 +288,11 @@
|
|||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673662873,
|
||||
"narHash": "sha256-/YOtiDKPUXKKpIhsAds11llfC42ScGW27bbHnNZebco=",
|
||||
"lastModified": 1673749717,
|
||||
"narHash": "sha256-hgrw8w/AThRWfVafx3EO3/TQlGcUou4nui8X47cVhXo=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "90163bbbadce526f8b248a5fe545b06c59597108",
|
||||
"rev": "aab6eb2dfc7a1e42d94b6f24ef13639ff8544af4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -37,7 +37,7 @@ in
|
|||
# pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
||||
# pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
||||
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.zk
|
||||
|
||||
|
|
Loading…
Reference in New Issue