Charlotte 🦝 Delenk
dd6abdb59e
All checks were successful
Hydra nixosConfigurations.container-default-x86_64-linux Hydra build #23446 of nixos-config:pr618:nixosConfigurations.container-default-x86_64-linux
Hydra nixosConfigurations.container-default-aarch64-linux Hydra build #23444 of nixos-config:pr618:nixosConfigurations.container-default-aarch64-linux
Hydra nixosConfigurations.container-default-riscv64-linux Hydra build #23445 of nixos-config:pr618:nixosConfigurations.container-default-riscv64-linux
Hydra checks.x86_64-linux.containers-default Hydra build #23443 of nixos-config:pr618:checks.x86_64-linux.containers-default
Hydra nixosConfigurations.not522 Hydra build #23447 of nixos-config:pr618:nixosConfigurations.not522
Hydra nixosConfigurations.not522-installer Hydra build #23448 of nixos-config:pr618:nixosConfigurations.not522-installer
81 lines
2.4 KiB
Nix
81 lines
2.4 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
boolToStr = b:
|
|
if b
|
|
then "true"
|
|
else "false";
|
|
boolToStr' = b:
|
|
if b
|
|
then "1"
|
|
else "0";
|
|
in {
|
|
xdg.configFile."nvim/lua/globals.lua".text = ''
|
|
local fn = vim.fn
|
|
local api = vim.api
|
|
|
|
local utils = require('utils')
|
|
|
|
-- Inspect something
|
|
function _G.inspect(item)
|
|
vim.print(item)
|
|
end
|
|
|
|
------------------------------------------------------------------------
|
|
-- custom variables --
|
|
------------------------------------------------------------------------
|
|
vim.g.is_win = ${boolToStr pkgs.stdenv.isCygwin}
|
|
vim.g.is_mac = ${boolToStr pkgs.stdenv.isDarwin}
|
|
vim.g.is_linux = ${boolToStr (!pkgs.stdenv.isCygwin && !pkgs.stdenv.isDarwin)}
|
|
vim.g.logging_level = "info"
|
|
|
|
------------------------------------------------------------------------
|
|
-- builtin variables --
|
|
------------------------------------------------------------------------
|
|
vim.g.loaded_perl_provider = 0
|
|
vim.g.loaded_ruby_provider = ${boolToStr' config.programs.neovim.withRuby}
|
|
vim.g.loaded_node_provider = ${boolToStr' config.programs.neovim.withNodeJs}
|
|
vim.g.did_install_default_menus = 1 -- do not load menu
|
|
|
|
-- Custom mapping <leader> (see `:h mapleader` for more info)
|
|
vim.g.mapleader = ','
|
|
|
|
-- Enable highlighting for lua HERE doc inside vim script
|
|
vim.g.vimsyn_embed = 'l'
|
|
|
|
-- Use English as main language
|
|
vim.cmd [[language en_US.UTF-8]]
|
|
|
|
-- Disable loading certain plugins
|
|
|
|
-- Whether to load netrw by default, see https://github.com/bling/dotvim/issues/4
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
vim.g.netrw_liststyle = 3
|
|
if vim.g.is_win then
|
|
vim.g.netrw_http_cmd = "curl --ssl-no-revoke -Lo"
|
|
end
|
|
|
|
-- Do not load tohtml.vim
|
|
vim.g.loaded_2html_plugin = 1
|
|
|
|
-- Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all these plugins are
|
|
-- related to checking files inside compressed files)
|
|
vim.g.loaded_zipPlugin = 1
|
|
vim.g.loaded_gzip = 1
|
|
vim.g.loaded_tarPlugin = 1
|
|
|
|
-- Do not load the tutor plugin
|
|
vim.g.loaded_tutor_mode_plugin = 1
|
|
|
|
-- Do not use builtin matchit.vim and matchparen.vim since we use vim-matchup
|
|
vim.g.loaded_matchit = 1
|
|
vim.g.loaded_matchparen = 1
|
|
|
|
-- Disable sql omni completion, it is broken.
|
|
vim.g.loaded_sql_completion = 1
|
|
'';
|
|
}
|