Skip to content

Commit f260aec

Browse files
authored
Support jumping to all Clojure's symbols (#75)
1 parent 9add135 commit f260aec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/acid/forms.lua

+3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ end
114114
-- @treturn string symbol under cursor
115115
-- @treturn table coordinates {from = {row,col}, to = {row,col}, bofnr = 1}
116116
forms.symbol_under_cursor = function()
117+
local isk = vim.api.nvim_get_option('iskeyword')
118+
vim.api.nvim_command("setlocal iskeyword=" .. isk .. ",#,%,&,'")
117119
local cw = vim.api.nvim_call_function("expand", {"<cword>"})
118120
local from = vim.api.nvim_call_function("searchpos", {cw, "nc"})
119121
local to = vim.api.nvim_call_function("searchpos", {cw, "nce"})
122+
vim.api.nvim_command("setlocal iskeyword=" .. isk)
120123

121124
return cw, {
122125
from = from,

0 commit comments

Comments
 (0)