this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: formatting

+9 -9
+9 -9
nvim/lua/config/claude.lua
··· 87 87 vim.notify("Claude binary not found. Please install claude-code CLI.", vim.log.levels.ERROR) 88 88 return 89 89 end 90 - 90 + 91 91 local file_context = helpers.get_file_context() 92 92 local selection = helpers.get_selection_info(opts.range > 0, opts.line1, opts.line2) 93 - 93 + 94 94 if not selection then 95 95 vim.notify("ClaudeFix requires a selection. Select text first or use a range.", vim.log.levels.WARN) 96 96 return 97 97 end 98 - 98 + 99 99 -- Get diagnostics for the selected range 100 100 local diagnostics = diagnostic_helpers.get_range_diagnostics(0, selection.start_line, selection.end_line) 101 - 101 + 102 102 if not diagnostic_helpers.has_diagnostics(0, selection.start_line, selection.end_line) then 103 103 vim.notify("No diagnostic issues found in selected range.", vim.log.levels.INFO) 104 104 return 105 105 end 106 - 106 + 107 107 local diagnostic_info = diagnostic_helpers.format_diagnostics_for_prompt(diagnostics) 108 108 local user_input = table.concat(opts.fargs, ' ') 109 109 if user_input == '' then 110 110 user_input = "Fix the diagnostic issues listed above" 111 111 end 112 - 112 + 113 113 local prompt = helpers.build_prompt(user_input, file_context, selection, false, diagnostic_info) 114 - 114 + 115 115 vim.notify("Claude is analyzing and fixing diagnostic issues...", vim.log.levels.INFO) 116 - 116 + 117 117 helpers.execute_claude_with_tools(prompt, function(response) 118 118 vim.schedule(function() 119 119 vim.notify("Claude diagnostic fix completed. Check the file for changes.", vim.log.levels.INFO) ··· 136 136 range = true, 137 137 desc = 'Ask Claude to edit selected code' 138 138 }) 139 - 139 + 140 140 -- Register :ClaudeFix command 141 141 vim.api.nvim_create_user_command('ClaudeFix', claude_fix_command, { 142 142 nargs = '*',