vimlm 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vimlm-0.1.1.dist-info → vimlm-0.1.2.dist-info}/METADATA +6 -5
- vimlm-0.1.2.dist-info/RECORD +7 -0
- vimlm.py +21 -17
- vimlm-0.1.1.dist-info/RECORD +0 -7
- {vimlm-0.1.1.dist-info → vimlm-0.1.2.dist-info}/LICENSE +0 -0
- {vimlm-0.1.1.dist-info → vimlm-0.1.2.dist-info}/WHEEL +0 -0
- {vimlm-0.1.1.dist-info → vimlm-0.1.2.dist-info}/entry_points.txt +0 -0
- {vimlm-0.1.1.dist-info → vimlm-0.1.2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: vimlm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: VimLM - LLM-powered Vim assistant
|
5
5
|
Home-page: https://github.com/JosefAlbers/vimlm
|
6
6
|
Author: Josef Albers
|
@@ -20,7 +20,7 @@ Dynamic: requires-dist
|
|
20
20
|
Dynamic: requires-python
|
21
21
|
Dynamic: summary
|
22
22
|
|
23
|
-
# VimLM - AI-Powered Coding Assistant for Vim
|
23
|
+
# VimLM - AI-Powered Coding Assistant for Vim/NeoVim
|
24
24
|
|
25
25
|

|
26
26
|
|
@@ -38,8 +38,8 @@ Get started quickly with the [tutorial](tutorial.md).
|
|
38
38
|
|
39
39
|
## Requirements
|
40
40
|
- Apple Silicon (M-series)
|
41
|
-
- Python
|
42
|
-
- Vim
|
41
|
+
- Python v3.12.8
|
42
|
+
- Vim v9.1 or NeoVim v0.10.4
|
43
43
|
|
44
44
|
## Quick Start
|
45
45
|
```bash
|
@@ -70,7 +70,7 @@ def quicksort(arr):
|
|
70
70
|
return quicksort(left) + middle + quicksort(right)
|
71
71
|
```
|
72
72
|
|
73
|
-
2. Use `Ctrl-j` to
|
73
|
+
2. Use `Ctrl-j` to autocomplete
|
74
74
|
|
75
75
|
### **Repository-Level Code Completion**
|
76
76
|
|
@@ -205,3 +205,4 @@ Edit `~/vimlm/cfg.json`:
|
|
205
205
|
## License
|
206
206
|
|
207
207
|
Apache 2.0 - See [LICENSE](LICENSE) for details.
|
208
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
vimlm.py,sha256=_XhyfZgHpK2W6OKWp-6Ruif-oRfIUn8ZMesM3u18vVU,34092
|
2
|
+
vimlm-0.1.2.dist-info/LICENSE,sha256=f1xgK8fAXg_intwnbc9nLkHf7ODPLtgpHs7DetQHOro,11343
|
3
|
+
vimlm-0.1.2.dist-info/METADATA,sha256=lj82Tm60yrL2dOgXu9vbChC0vDfoJBA8hdpT5rMs5DY,6323
|
4
|
+
vimlm-0.1.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
5
|
+
vimlm-0.1.2.dist-info/entry_points.txt,sha256=mU5V4MYsuIzCc6YB-Ro-6USSHWN5vHw8UDnTEoq0isw,36
|
6
|
+
vimlm-0.1.2.dist-info/top_level.txt,sha256=I8GjqoiP--scYsO3AfLhha-6Ax9ci3IvbWvVbPv8g94,6
|
7
|
+
vimlm-0.1.2.dist-info/RECORD,,
|
vimlm.py
CHANGED
@@ -28,13 +28,12 @@ import tempfile
|
|
28
28
|
from pathlib import Path
|
29
29
|
from string import Template
|
30
30
|
import re
|
31
|
-
|
32
31
|
import sys
|
33
32
|
import tty
|
34
33
|
import termios
|
35
34
|
|
36
35
|
DEFAULTS = dict(
|
37
|
-
LLM_MODEL = "mlx-community/Qwen2.5-Coder-3B-Instruct-4bit", # None | "mlx-community/DeepSeek-R1-Distill-Qwen-7B-4bit" | "mlx-community/deepseek-r1-distill-qwen-1.5b" | "mlx-community/phi-4-4bit" (8.25gb) | "mlx-community/Qwen2.5-Coder-14B-Instruct-4bit" (8.31gb) | "mlx-community/Qwen2.5-Coder-3B-Instruct-4bit" (1.74gb)
|
36
|
+
LLM_MODEL = "mlx-community/Qwen2.5-Coder-3B-Instruct-4bit", # None | "mlx-community/DeepSeek-R1-Distill-Qwen-7B-4bit" | "mlx-community/deepseek-r1-distill-qwen-1.5b" | "mlx-community/phi-4-4bit" (8.25gb) | "mlx-community/Qwen2.5-Coder-14B-Instruct-4bit" (8.31gb) | "mlx-community/Qwen2.5-Coder-3B-Instruct-4bit" (1.74gb) | "mlx-community/phi-4-4bit" (8.25gb)
|
38
37
|
FIM_MODEL = "mlx-community/Qwen2.5-Coder-0.5B-4bit", # None | "mlx-community/Qwen2.5-Coder-32B-4bit" | "mlx-community/Qwen2.5-Coder-0.5B-4bit" (278mb)
|
39
38
|
NUM_TOKEN = 2000,
|
40
39
|
USE_LEADER = False,
|
@@ -43,7 +42,7 @@ DEFAULTS = dict(
|
|
43
42
|
SHOW_USER = False,
|
44
43
|
SEP_CMD = '!',
|
45
44
|
THINK = ('<think>', '</think>'),
|
46
|
-
VERSION = '0.1.
|
45
|
+
VERSION = '0.1.2',
|
47
46
|
DEBUG = False,
|
48
47
|
)
|
49
48
|
|
@@ -555,10 +554,10 @@ function! SaveUserInput(prompt)
|
|
555
554
|
return
|
556
555
|
endif
|
557
556
|
let user_file = s:watched_dir . '/user'
|
558
|
-
call writefile([user_input], user_file
|
557
|
+
call writefile([user_input], user_file)
|
559
558
|
let current_file = expand('%:p')
|
560
559
|
let tree_file = s:watched_dir . '/tree'
|
561
|
-
call writefile([current_file], tree_file
|
560
|
+
call writefile([current_file], tree_file)
|
562
561
|
call ScrollToTop()
|
563
562
|
endfunction
|
564
563
|
|
@@ -577,9 +576,9 @@ function! NormalPrompt()
|
|
577
576
|
endfunction
|
578
577
|
|
579
578
|
function! FollowUpPrompt()
|
580
|
-
call writefile([], s:watched_dir . '/yank'
|
581
|
-
call writefile([], s:watched_dir . '/context'
|
582
|
-
call writefile([], s:watched_dir . '/followup'
|
579
|
+
call writefile([], s:watched_dir . '/yank')
|
580
|
+
call writefile([], s:watched_dir . '/context')
|
581
|
+
call writefile([], s:watched_dir . '/followup')
|
583
582
|
call SaveUserInput('... ')
|
584
583
|
endfunction
|
585
584
|
|
@@ -651,7 +650,7 @@ function! VimLM(...) range
|
|
651
650
|
while filereadable(wip_file)
|
652
651
|
sleep 100m
|
653
652
|
endwhile
|
654
|
-
call writefile([], wip_file
|
653
|
+
call writefile([], wip_file)
|
655
654
|
let user_input = join(a:000, ' ')
|
656
655
|
if empty(user_input)
|
657
656
|
echo "Usage: :VimLM <prompt> [!command1] [!command2] ..."
|
@@ -663,10 +662,10 @@ function! VimLM(...) range
|
|
663
662
|
silent execute "'<,'>w! " . s:watched_dir . "/yank"
|
664
663
|
silent execute "w! " . s:watched_dir . "/context"
|
665
664
|
let user_file = s:watched_dir . '/user'
|
666
|
-
call writefile([user_input], user_file
|
665
|
+
call writefile([user_input], user_file)
|
667
666
|
let current_file = expand('%:p')
|
668
667
|
let tree_file = s:watched_dir . '/tree'
|
669
|
-
call writefile([current_file], tree_file
|
668
|
+
call writefile([current_file], tree_file)
|
670
669
|
call ScrollToTop()
|
671
670
|
endfunction
|
672
671
|
|
@@ -683,7 +682,9 @@ function! SplitAtCursorInInsert()
|
|
683
682
|
endif
|
684
683
|
let suffix_lines = []
|
685
684
|
let suffix_part = strpart(current_line, col - 1)
|
686
|
-
if
|
685
|
+
if empty(suffix_part)
|
686
|
+
call add(suffix_lines, "")
|
687
|
+
else
|
687
688
|
call add(suffix_lines, suffix_part)
|
688
689
|
endif
|
689
690
|
if line_num < len(lines)
|
@@ -691,11 +692,11 @@ function! SplitAtCursorInInsert()
|
|
691
692
|
endif
|
692
693
|
call writefile(prefix_lines, s:watched_dir . '/context', 'b')
|
693
694
|
call writefile(suffix_lines, s:watched_dir . '/yank', 'b')
|
694
|
-
call writefile([], s:watched_dir . '/fim'
|
695
|
-
call writefile([], s:watched_dir . '/user'
|
695
|
+
call writefile([], s:watched_dir . '/fim')
|
696
|
+
call writefile([], s:watched_dir . '/user')
|
696
697
|
let current_file = expand('%:p')
|
697
698
|
let tree_file = s:watched_dir . '/tree'
|
698
|
-
call writefile([current_file], tree_file
|
699
|
+
call writefile([current_file], tree_file)
|
699
700
|
call ScrollToTop()
|
700
701
|
endfunction
|
701
702
|
|
@@ -705,8 +706,10 @@ function! InsertResponse()
|
|
705
706
|
echoerr "Response file not found: " . response_path
|
706
707
|
return
|
707
708
|
endif
|
708
|
-
let content = readfile(response_path)
|
709
|
+
let content = readfile(response_path, 'b')
|
709
710
|
let text = join(content, "\n")
|
711
|
+
let saved_z = getreg('z')
|
712
|
+
let saved_ztype = getregtype('z')
|
710
713
|
call setreg('z', text)
|
711
714
|
let col = col('.')
|
712
715
|
let line = getline('.')
|
@@ -715,11 +718,12 @@ function! InsertResponse()
|
|
715
718
|
else
|
716
719
|
normal! "zgP
|
717
720
|
endif
|
721
|
+
call setreg('z', saved_z, saved_ztype)
|
718
722
|
endfunction
|
719
723
|
|
720
724
|
function! TabInInsert()
|
721
725
|
let wip_file = s:watched_dir . '/wip'
|
722
|
-
call writefile([], wip_file
|
726
|
+
call writefile([], wip_file)
|
723
727
|
call SplitAtCursorInInsert()
|
724
728
|
while filereadable(wip_file)
|
725
729
|
sleep 10m
|
vimlm-0.1.1.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
vimlm.py,sha256=C8b9W3HthJhSF5tU5YNK7E26R-7OZJwsezOINSzV_28,33956
|
2
|
-
vimlm-0.1.1.dist-info/LICENSE,sha256=f1xgK8fAXg_intwnbc9nLkHf7ODPLtgpHs7DetQHOro,11343
|
3
|
-
vimlm-0.1.1.dist-info/METADATA,sha256=jjtEcKF0tKJseHGLEQ83AOuz1UC72QG4JVTE3vUaGYM,6359
|
4
|
-
vimlm-0.1.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
5
|
-
vimlm-0.1.1.dist-info/entry_points.txt,sha256=mU5V4MYsuIzCc6YB-Ro-6USSHWN5vHw8UDnTEoq0isw,36
|
6
|
-
vimlm-0.1.1.dist-info/top_level.txt,sha256=I8GjqoiP--scYsO3AfLhha-6Ax9ci3IvbWvVbPv8g94,6
|
7
|
-
vimlm-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|