Skip to content

Commit 74b4479

Browse files
author
Francis
committed
Python not working in nvim..
1 parent 47687fc commit 74b4479

File tree

3 files changed

+76
-140
lines changed

3 files changed

+76
-140
lines changed

.DS_Store

0 Bytes
Binary file not shown.

init.lua

Lines changed: 69 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ require('lazy').setup({
277277
version = '*',
278278
lazy = false,
279279
config = function()
280-
require('nvim-tree').setup {}
280+
require('nvim-tree').setup {
281+
sync_root_with_cwd = true,
282+
respect_buf_cwd = true,
283+
}
281284
-- Optional: Keybinding to toggle nvim-tree
282285
vim.keymap.set('n', '<leader>e', ':NvimTreeToggle<CR>', { desc = 'Toggle File Explorer (nvim-tree)' })
283286
end,
@@ -321,7 +324,17 @@ require('lazy').setup({
321324
},
322325
},
323326
},
327+
-- NOTE: CLaude code Plugin
324328

329+
{
330+
'greggh/claude-code.nvim',
331+
dependencies = {
332+
'nvim-lua/plenary.nvim', -- Required for git operations
333+
},
334+
config = function()
335+
require('claude-code').setup()
336+
end,
337+
},
325338
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
326339
--
327340
-- This is often very useful to both group configuration, as well as handle
@@ -335,7 +348,6 @@ require('lazy').setup({
335348
--
336349
-- Then, because we use the `opts` key (recommended), the configuration runs
337350
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
338-
339351
{ -- Useful plugin to show you pending keybinds.
340352
'folke/which-key.nvim',
341353
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
@@ -388,73 +400,6 @@ require('lazy').setup({
388400
},
389401
},
390402
},
391-
--NOTE: Avante blink cmp
392-
{
393-
'Kaiser-Yang/blink-cmp-avante',
394-
dependencies = { 'saghen/blink.cmp', 'yetone/avante.nvim' },
395-
lazy = false,
396-
},
397-
--NOTE: Avante! Setup
398-
399-
{
400-
'yetone/avante.nvim',
401-
event = 'VeryLazy',
402-
version = false, -- Never set this value to "*"! Never!
403-
opts = {
404-
-- add any opts here
405-
-- for example
406-
provider = 'claude',
407-
openai = {
408-
endpoint = 'https://api.anthropic.com',
409-
model = 'claude-3-7-sonnet-20250219', -- your desired model (or use gpt-4o, etc.)
410-
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
411-
temperature = 0,
412-
max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
413-
--reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
414-
},
415-
},
416-
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
417-
build = 'make',
418-
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
419-
dependencies = {
420-
'nvim-treesitter/nvim-treesitter',
421-
'stevearc/dressing.nvim',
422-
'nvim-lua/plenary.nvim',
423-
'MunifTanjim/nui.nvim',
424-
--- The below dependencies are optional,
425-
'echasnovski/mini.pick', -- for file_selector provider mini.pick
426-
'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
427-
'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
428-
'ibhagwan/fzf-lua', -- for file_selector provider fzf
429-
'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
430-
'zbirenbaum/copilot.lua', -- for providers='copilot'
431-
{
432-
-- support for image pasting
433-
'HakonHarnes/img-clip.nvim',
434-
event = 'VeryLazy',
435-
opts = {
436-
-- recommended settings
437-
default = {
438-
embed_image_as_base64 = false,
439-
prompt_for_file_name = false,
440-
drag_and_drop = {
441-
insert_mode = true,
442-
},
443-
-- required for Windows users
444-
use_absolute_path = true,
445-
},
446-
},
447-
},
448-
{
449-
-- Make sure to set this up properly if you have lazy=true
450-
'MeanderingProgrammer/render-markdown.nvim',
451-
opts = {
452-
file_types = { 'markdown', 'Avante' },
453-
},
454-
ft = { 'markdown', 'Avante' },
455-
},
456-
},
457-
},
458403
-- NOTE: Plugins can specify dependencies.
459404
--
460405
-- The dependencies are proper plugin specifications as well - anything
@@ -886,10 +831,6 @@ require('lazy').setup({
886831
event = 'VimEnter',
887832
version = '1.*',
888833
dependencies = {
889-
--
890-
--
891-
--
892-
'Kaiser-Yang/blink-cmp-avante',
893834
-- Snippet Engine
894835
{
895836
'L3MON4D3/LuaSnip',
@@ -907,12 +848,12 @@ require('lazy').setup({
907848
-- `friendly-snippets` contains a variety of premade snippets.
908849
-- See the README about individual language/framework/plugin snippets:
909850
-- https://github.com/rafamadriz/friendly-snippets
910-
-- {
911-
-- 'rafamadriz/friendly-snippets',
912-
-- config = function()
913-
-- require('luasnip.loaders.from_vscode').lazy_load()
914-
-- end,
915-
-- },
851+
{
852+
'rafamadriz/friendly-snippets',
853+
config = function()
854+
require('luasnip.loaders.from_vscode').lazy_load()
855+
end,
856+
},
916857
},
917858
opts = {},
918859
},
@@ -961,56 +902,13 @@ require('lazy').setup({
961902
documentation = { auto_show = false, auto_show_delay_ms = 500 },
962903
},
963904

964-
-- providers = {
965-
-- lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
966-
-- avante_commands = {
967-
-- name = 'avante_commands',
968-
-- module = 'blink.compat.source',
969-
-- score_offset = 90,
970-
-- opts = {},
971-
-- },
972-
-- avante_files = {
973-
-- name = 'avante_files',
974-
-- module = 'blink.compat.source',
975-
-- score_offset = 100,
976-
-- opts = {},
977-
-- },
978-
-- avante_mentions = {
979-
-- name = 'avante_mentions',
980-
-- module = 'blink.compat.source',
981-
-- score_offset = 1000,
982-
-- opts = {},
983-
-- },
984-
-- },
985-
-- },
986-
--
987905
sources = {
988-
default = { 'avante', 'lsp', 'path', 'snippets', 'lazydev' },
906+
default = { 'lsp', 'path', 'snippets', 'lazydev' },
989907
providers = {
990908
lazydev = {
991909
module = 'lazydev.integrations.blink',
992910
score_offset = 100,
993911
},
994-
avante = {
995-
name = 'Avante',
996-
module = 'blink-cmp-avante',
997-
opts = {
998-
command = {
999-
get_kind_name = function()
1000-
return 'AvanteCmd'
1001-
end,
1002-
},
1003-
mention = {
1004-
get_kind_name = function()
1005-
return 'AvanteMention'
1006-
end,
1007-
},
1008-
kind_icons = {
1009-
AvanteCmd = '',
1010-
AvanteMention = '',
1011-
},
1012-
},
1013-
},
1014912
},
1015913
},
1016914
snippets = { preset = 'luasnip' },
@@ -1194,8 +1092,54 @@ require('lazy').setup({
11941092
},
11951093
},
11961094
})
1197-
-- vim.api.nvim_set_hl(0, 'BlinkCmpKindAvanteCmd', { default = false, fg = '#89b4fa' })
1198-
-- vim.api.nvim_set_hl(0, 'BlinkCmpKindAvanteMention', { default = false, fg = '#f38ba8' })
1095+
1096+
-- NOTE: Claude Code Plugin Config
1097+
require('claude-code').setup {
1098+
-- Terminal window settings
1099+
window = {
1100+
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
1101+
position = 'vertical', -- Position of the window: "botright", "topleft", "vertical", "rightbelow vsplit", etc.
1102+
enter_insert = true, -- Whether to enter insert mode when opening Claude Code
1103+
hide_numbers = true, -- Hide line numbers in the terminal window
1104+
hide_signcolumn = true, -- Hide the sign column in the terminal window
1105+
},
1106+
-- File refresh settings
1107+
refresh = {
1108+
enable = true, -- Enable file change detection
1109+
updatetime = 100, -- updatetime when Claude Code is active (milliseconds)
1110+
timer_interval = 1000, -- How often to check for file changes (milliseconds)
1111+
show_notifications = true, -- Show notification when files are reloaded
1112+
},
1113+
-- Git project settings
1114+
git = {
1115+
use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project)
1116+
},
1117+
-- Command settings
1118+
command = 'claude', -- Command used to launch Claude Code
1119+
-- Command variants
1120+
command_variants = {
1121+
-- Conversation management
1122+
continue = '--continue', -- Resume the most recent conversation
1123+
resume = '--resume', -- Display an interactive conversation picker
1124+
1125+
-- Output options
1126+
verbose = '--verbose', -- Enable verbose logging with full turn-by-turn output
1127+
},
1128+
-- Keymaps
1129+
keymaps = {
1130+
toggle = {
1131+
normal = '<C-,>', -- Normal mode keymap for toggling Claude Code, false to disable
1132+
terminal = '<C-,>', -- Terminal mode keymap for toggling Claude Code, false to disable
1133+
variants = {
1134+
continue = '<leader>cC', -- Normal mode keymap for Claude Code with continue flag
1135+
verbose = '<leader>cV', -- Normal mode keymap for Claude Code with verbose flag
1136+
},
1137+
},
1138+
window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>)
1139+
scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down
1140+
},
1141+
}
11991142

12001143
-- The line beneath this is called `modeline`. See `:help modeline`
12011144
-- vim: ts=2 sts=2 sw=2 et
1145+
vim.g.python3_host_prog = '/Users/fq/.pyenv/versions/3.13.1/envs/rca/bin/python3'

lazy-lock.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
{
2-
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
3-
"avante.nvim": { "branch": "main", "commit": "b2064a8f40cbd10ddd3ea9d82f0bdb2bcaf2f152" },
4-
"blink-cmp-avante": { "branch": "master", "commit": "ddefb8de3cb1286ab39e0ccec0f32a45d03391f2" },
2+
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
53
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
6-
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
7-
"copilot.lua": { "branch": "master", "commit": "7ba73866b9b3c696f80579c470c6eec374d3acec" },
8-
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
4+
"claude-code.nvim": { "branch": "main", "commit": "ffdf35d8566528cb144d9812eccfecee34502edf" },
5+
"conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" },
96
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
10-
"fzf-lua": { "branch": "main", "commit": "02def6b972d7687866738d6f6a5f4839ce5b5a7a" },
7+
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
118
"gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" },
12-
"img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" },
139
"kanso.nvim": { "branch": "main", "commit": "62e9c5d669567d086474b2b6863e0724c71c6c99" },
1410
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
1511
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
1612
"mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
1713
"mason-tool-installer.nvim": { "branch": "main", "commit": "aafae207d5a2a28c59c9d478d8581c2739135d09" },
1814
"mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
19-
"mini.nvim": { "branch": "main", "commit": "6105b69d79fef0afed5ed576081b1997ef2b4be1" },
20-
"mini.pick": { "branch": "main", "commit": "fa1e449e1080bf7aa9b2890ee186d23b1b4e1287" },
21-
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
22-
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
23-
"nvim-lspconfig": { "branch": "master", "commit": "4bc481b6f0c0cf3671fc894debd0e00347089a4e" },
15+
"mini.nvim": { "branch": "main", "commit": "a9e4cb303ea6269ecab92c0276baf9d04370c492" },
16+
"nvim-lspconfig": { "branch": "master", "commit": "f817582301b2c188c1cff7c956971ce3f85631ff" },
2417
"nvim-tree.lua": { "branch": "master", "commit": "be5b788f2dc1522c73fb7afad9092331c8aebe80" },
2518
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
26-
"nvim-web-devicons": { "branch": "master", "commit": "2c2b4eafce6cdd0cb165036faa17396eff18f847" },
19+
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
2720
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
28-
"render-markdown.nvim": { "branch": "main", "commit": "ff577b44bd3ab642acec0f134a7bf26b7278d137" },
2921
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
3022
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
3123
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },

0 commit comments

Comments
 (0)