File tree Expand file tree Collapse file tree 3 files changed +32
-17
lines changed Expand file tree Collapse file tree 3 files changed +32
-17
lines changed Original file line number Diff line number Diff line change 22 name ,
33 config ,
44 lib ,
5+ pkgs ,
56 helpers ,
67 ...
78} :
1718 config =
1819 let
1920 derivationName = "nvim-" + lib . replaceStrings [ "/" ] [ "-" ] name ;
21+ writeContent = if config . type == "lua" then helpers . writeLua else pkgs . writeText ;
2022 in
2123 {
2224 path = lib . mkDefault name ;
2325 type = lib . mkDefault ( if lib . hasSuffix ".vim" name then "vim" else "lua" ) ;
2426 # No need to use mkDerivedConfig; this option is readOnly.
25- plugin = helpers . writeLua derivationName config . content ;
27+ plugin = writeContent derivationName config . content ;
2628 } ;
2729}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ {
2+ after = {
3+ files . "after/ftplugin/python.lua" = {
4+ localOpts . conceallevel = 1 ;
5+
6+ keymaps = [
7+ {
8+ mode = "n" ;
9+ key = "<C-g>" ;
10+ action = ":!python script.py<CR>" ;
11+ options . silent = true ;
12+ }
13+ ] ;
14+ } ;
15+ } ;
16+
17+ vim-type = {
18+ files . "plugin/default_indent.vim" . opts = {
19+ shiftwidth = 2 ;
20+ expandtab = true ;
21+ } ;
22+
23+ extraConfigLuaPost = ''
24+ vim.cmd.runtime("plugin/default_indent.vim")
25+ assert(vim.o.shiftwidth == 2, "shiftwidth is not set")
26+ assert(vim.o.expandtab, "expandtab is not set")
27+ '' ;
28+ } ;
29+ }
You can’t perform that action at this time.
0 commit comments