Initial commit

This commit is contained in:
2025-04-24 00:33:12 +09:00
commit 9f68b841b2
46 changed files with 1881 additions and 0 deletions

48
nix/latex.nix Normal file
View File

@@ -0,0 +1,48 @@
{ pkgs }:
pkgs.texliveBasic.withPackages
(ps: [
ps.biber
ps.biblatex
ps.bibtex
ps.babel
ps.babel-japanese
ps.noto
ps.latexmk
ps.csquotes
ps.digestif
ps.import
ps.subfiles
ps.wrapfig
ps.collection-langjapanese
ps.amsmath
ps.amsfonts
ps.mathtools
ps.listings
ps.luatexja
ps.luainputenc
ps.lualatex-math
ps.unicode-math
ps.luacode
ps.enumitem
ps.latex-fonts
ps.hyperref
ps.graphics
ps.blindtext
ps.xcolor
ps.xpatch
ps.xstring
ps.float
ps.framed
ps.fontspec
ps.ninecolors
ps.here
ps.caption
ps.newtx
ps.tabularray
ps.fancyhdr
ps.fancybox
ps.fancyvrb
ps.ascmac
ps.ragged2e
ps.footmisc
])

16
nix/overlay.nix Normal file
View File

@@ -0,0 +1,16 @@
{ eskk-vim }:
[
(final: prev:
let
vim-eskk = prev.vimUtils.buildVimPlugin {
name = "vim-eskk";
src = eskk-vim;
};
in
{
vimPlugins = prev.vimPlugins // {
inherit vim-eskk;
};
}
)
]

79
nix/vim.nix Normal file
View File

@@ -0,0 +1,79 @@
{ pkgs, ... }:
pkgs.vim_configurable.customize {
name = "vim-nit-latex";
vimrcConfig.customRC = ''
filetype on
set encoding=utf-8
set autoindent
set smartindent
set shiftwidth=4
set tabstop=4
set smarttab
set expandtab
set wrap
syntax enable
set cursorline
set mousehide
set ruler
set number relativenumber
set nospell
set magic
set ignorecase
set smartcase
set hlsearch
set incsearch
let g:eskk#directory = "~/.config/eskk"
let g:eskk#dictionary = { 'path': "~/.config/eskk/jisyo", 'sorted': 1, 'encoding': 'utf-8', }
let g:eskk#large_dictionary = { 'path': "~/.config/eskk/SKK-JISYO.L", 'sorted': 1, 'encoding': 'euc-jp', }
let g:eskk#kakutei_when_unique_candidate = 0
let g:eskk#enable_completion = 0
let g:eskk#no_default_mappings = 1
let g:eskk#keep_state = 0
let g:eskk#egg_like_newline = 1
let g:toggle_latex_eskk = 1
function! s:latex_eskk() abort
if &filetype == 'tex' && g:toggle_latex_eskk ==# 1
call eskk#enable()
endif
endfunction
function! s:latex_eskk_toggle() abort
let g:toggle_latex_eskk = g:toggle_latex_eskk == 1 ? 0 : 1
if g:toggle_latex_eskk ==# 1
echomsg 'LaTeX Japanese Input Enabled'
else
echomsg 'LaTeX Japanese Input Disabled'
endif
endfunction
augroup vimrc_eskk
autocmd!
autocmd Filetype tex nnoremap <buffer><silent> <F1> :call <SID>latex_eskk_toggle()<CR>
autocmd User eskk-enable-post lmap <buffer> l <Plug>(eskk:disable)
augroup END
augroup latex_abbr
autocmd!
autocmd Filetype tex iabbrev <buffer> trm \textrm{}<Left>
autocmd Filetype tex iabbrev <buffer> tsf \textsf{}<Left>
autocmd Filetype tex iabbrev <buffer> ttt \texttt{}<Left>
autocmd Filetype tex iabbrev <buffer> tit \textit{}<Left>
autocmd Filetype tex iabbrev <buffer> tbf \textbf{}<Left>
autocmd Filetype tex iabbrev <buffer> tup \textup{}<Left>
autocmd Filetype tex iabbrev <buffer> ecl \begin{lstlisting}[language=, caption=]<CR><CR>\end{lstlisting}<ESC>2kf=a
autocmd Filetype tex iabbrev <buffer> ecf \lstinputlisting[language=]{}
augroup END
imap jk <Plug>(eskk:toggle)
cmap jk <Plug>(eskk:toggle)
'';
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [ vim-eskk ];
opt = [];
};
}