Skip to content

Commit 7daf143

Browse files
authored
fix(slash_commands): scope constants to be local (olimorris#787)
Co-authored-by: Oli Morris <[email protected]>
1 parent 8956198 commit 7daf143

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

lua/codecompanion/strategies/chat/slash_commands/buffer.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local util = require("codecompanion.utils")
88
local api = vim.api
99
local fmt = string.format
1010

11-
CONSTANTS = {
11+
local CONSTANTS = {
1212
NAME = "Buffer",
1313
PROMPT = "Select buffer(s)",
1414
}

lua/codecompanion/strategies/chat/slash_commands/fetch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local util_hash = require("codecompanion.utils.hash")
99

1010
local fmt = string.format
1111

12-
CONSTANTS = {
12+
local CONSTANTS = {
1313
NAME = "Fetch",
1414
CACHE_PATH = vim.fn.stdpath("cache") .. "/codecompanion/urls",
1515
}

lua/codecompanion/strategies/chat/slash_commands/file.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local util = require("codecompanion.utils")
66

77
local fmt = string.format
88

9-
CONSTANTS = {
9+
local CONSTANTS = {
1010
NAME = "File",
1111
PROMPT = "Select file(s)",
1212
}

lua/codecompanion/strategies/chat/slash_commands/help.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local ts = vim.treesitter
88

99
local line_count = 0
1010

11-
CONSTANTS = {
11+
local CONSTANTS = {
1212
NAME = "Help",
1313
PROMPT = "Select a help tag",
1414
MAX_LINES = config.strategies.chat.slash_commands.help.opts.max_lines,

lua/codecompanion/strategies/chat/slash_commands/symbols.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local util = require("codecompanion.utils")
1414
local fmt = string.format
1515
local get_node_text = vim.treesitter.get_node_text --[[@type function]]
1616

17-
CONSTANTS = {
17+
local CONSTANTS = {
1818
NAME = "Symbols",
1919
PROMPT = "Select symbol(s)",
2020
}

lua/codecompanion/strategies/chat/slash_commands/terminal.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local config = require("codecompanion.config")
22
local log = require("codecompanion.utils.log")
33
local util = require("codecompanion.utils")
44

5-
CONSTANTS = {
5+
local CONSTANTS = {
66
NAME = "Terminal Output",
77
}
88

lua/codecompanion/strategies/chat/slash_commands/workspace.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local util = require("codecompanion.utils")
55

66
local fmt = string.format
77

8-
CONSTANTS = {
8+
local CONSTANTS = {
99
NAME = "Workspace",
1010
PROMPT = "Select a workspace group",
1111
WORKSPACE_FILE = vim.fs.joinpath(vim.fn.getcwd(), "codecompanion-workspace.json"),

0 commit comments

Comments
 (0)