Browse Source

Kitty update. nimlsp & kak-lsp working. new nim flags. minor script fixes.

master
SolitudeSF 1 month ago
parent
commit
85dc6bf126
Signed by: SolitudeSF <solitudesf@protonmail.com> GPG Key ID: 789B06817C385387
6 changed files with 21 additions and 15 deletions
  1. 1
    1
      bin/mpw-get
  2. 1
    2
      bin/screenshot
  3. 2
    1
      kak/kakrc
  4. 7
    0
      kitty/kitty.conf
  5. 0
    1
      mpd
  6. 10
    10
      nim.nim

+ 1
- 1
bin/mpw-get View File

@@ -10,4 +10,4 @@ if (eq 0 (count $args)) {
10 10
 } else {
11 11
   t=$args[0]
12 12
 }
13
-mpw -t x -M (gpg2 -d -q ~/sns/password.gpg) $t 2>/dev/null | xclip -sel c -r
13
+mpw -t x -M (gpg2 -d -q ~/sns/password.gpg) $t 2>/dev/null | xclip -sel c -r -l 1

+ 1
- 2
bin/screenshot View File

@@ -1,8 +1,7 @@
1 1
 #!/bin/sh
2 2
 dir=$(xdg-user-dir PICTURES)/screen
3 3
 [ -d "$dir" ] || mkdir -p "$dir"
4
-file=$(date +"%Y-%m-%d_%H:%M:%S").png
5
-path=$dir/$file
4
+path=$dir/$(date "+%Y-%m-%d_%H:%M:%S").png
6 5
 if maim -u -s "$path"; then
7 6
 	notify-send --icon "$path" "Screenshot saved" "$path"
8 7
 	xclip -sel c -t image/png "$path"

+ 2
- 1
kak/kakrc View File

@@ -220,9 +220,10 @@ hook global WinSetOption filetype=nim %{
220 220
     set buffer gdb_program 'nim-gdb'
221 221
     set buffer formatcmd "nimpretty ${kak_buffile}"
222 222
     set buffer makecmd 'nimble build'
223
+    no-tabs 2
224
+    lsp-engage
223 225
     # set buffer lintcmd "sh -c 'cp -f $0 $0.nim;nim --stdout --colors:off --hints:off --path:$(dirname ${kak_buffile}) check $0 | sed \"s/(/:/;s/, /:/;s/)/:/\" | sed \":a;N;/\n[buf.nim]/!s/\n//;ta;P;D\"'"
224 226
     # set buffer lintcmd "sh -c 'nim --stdout --hints:off check $0 | sed \'s/(/:/;s/, /:/;s/)/:/\''"
225 227
     # lint-on-write
226 228
     # format-on-write
227
-    no-tabs 2
228 229
 }

+ 7
- 0
kitty/kitty.conf View File

@@ -20,6 +20,7 @@ scrollback_pager less --chop-long-lines -R +INPUT_LINE_NUMBER
20 20
 wheel_scroll_multiplier 5.0
21 21
 click_interval 0.5
22 22
 
23
+strip_trailing_spaces always
23 24
 select_by_word_characters :@-./_~?&=%+#
24 25
 
25 26
 shell elvish
@@ -63,12 +64,18 @@ window_padding_width 0
63 64
 
64 65
 inactive_text_alpha 1.0
65 66
 
67
+resize_debounce_time 0.1
68
+resize_draw_strategy size
69
+
66 70
 tab_bar_edge bottom
67 71
 tab_bar_margin_width 0
68 72
 # fade | separator
69 73
 tab_bar_style separator
74
+tab_bar_min_tabs 2
75
+tab_switch_strategy previous
70 76
 tab_fade 0.15 0.3 0.45 0.8
71 77
 tab_separator " ┇"
78
+tab_title_template {title}
72 79
 
73 80
 active_tab_font_style bold-italic
74 81
 inactive_tab_font_style normal

+ 0
- 1
mpd View File

@@ -13,7 +13,6 @@ bind_to_address         "127.0.0.1"
13 13
 bind_to_address         "~/.local/share/mpd/socket"
14 14
 port                    "6600"
15 15
 auto_update             "yes"
16
-#auto_update_depth      "3"
17 16
 replaygain              "album"
18 17
 replaygain_preamp       "0"
19 18
 #volume_normalization   "no"

+ 10
- 10
nim.nim View File

@@ -2,8 +2,6 @@ from macros import error
2 2
 
3 3
 type Compiler = enum gcc = "gcc", clang = "clang"
4 4
 
5
-const is199 = (NimMajor, NimMinor, NimPatch) >= (0, 19, 9)
6
-
7 5
 proc setCompiler(s: string, compiler = gcc, cpp = false) =
8 6
   let c = findExe s
9 7
   let cpp = (if cpp: ".cpp" else: "")
@@ -34,16 +32,18 @@ when defined(musl):
34 32
   setCompiler "x86_64-linux-musl-gcc"
35 33
   switch "passL", "-static"
36 34
 
37
-when is199:
38
-  switch "styleCheck", "hint"
39
-
40
-when defined(release):
41
-  when is199:
42
-    switch "nimcache", "/tmp/nim/" & projectName() & "_r"
35
+when defined(release) or defined(danger):
43 36
   switch "passC", "-flto"
44 37
   switch "passL", "-s"
45
-elif is199:
46
-  switch "nimcache", "/tmp/nim/" & projectName() & "_d"
38
+
39
+when (NimMajor, NimMinor, NimPatch) >= (0, 19, 9):
40
+  switch "styleCheck", "hint"
41
+  when defined(release):
42
+    switch "nimcache", "/tmp/nim/" & projectName() & "_r"
43
+  when defined(danger):
44
+    switch "nimcache", "/tmp/nim/" & projectName() & "_d"
45
+  else:
46
+    switch "nimcache", "/tmp/nim/" & projectName()
47 47
 
48 48
 when defined(hotcodereloading):
49 49
   switch "nimcache", "nimcache"

Loading…
Cancel
Save