mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-05-06 10:46:19 +03:00
added messagepack
This commit is contained in:
parent
fdd4e3060e
commit
490d632a29
4 changed files with 154 additions and 150 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "msgpack-d"]
|
||||||
|
path = msgpack-d
|
||||||
|
url = https://github.com/msgpack/msgpack-d.git
|
|
@ -316,7 +316,7 @@ local keywords = {
|
||||||
|
|
||||||
-- For this module to work the dscanner program must be installed. Configure the
|
-- For this module to work the dscanner program must be installed. Configure the
|
||||||
-- path to the executable here
|
-- path to the executable here
|
||||||
M.PATH_TO_DSCANNER = "dscanner"
|
M.PATH_TO_DSCANNER = "/home/alaran/src/dscanner-master/dscanner"
|
||||||
|
|
||||||
_M.textadept.editing.comment_string.dmd = '//'
|
_M.textadept.editing.comment_string.dmd = '//'
|
||||||
_M.textadept.run.compile_command.dmd = 'dmd -c -o- %(filename)'
|
_M.textadept.run.compile_command.dmd = 'dmd -c -o- %(filename)'
|
||||||
|
@ -367,34 +367,34 @@ local function showCompletionList(r)
|
||||||
buffer.auto_c_choose_single = setting
|
buffer.auto_c_choose_single = setting
|
||||||
end
|
end
|
||||||
|
|
||||||
--events.connect(events.CHAR_ADDED, function(ch)
|
events.connect(events.CHAR_ADDED, function(ch)
|
||||||
-- if buffer:get_lexer() ~= "dmd" then return end
|
if buffer:get_lexer() ~= "dmd" then return end
|
||||||
-- if ch > 255 then return end
|
if ch > 255 then return end
|
||||||
-- local character = string.char(ch)
|
local character = string.char(ch)
|
||||||
-- if character == "." or character == "(" then
|
if character == "." or character == "(" then
|
||||||
-- local fileName = os.tmpname()
|
local fileName = os.tmpname()
|
||||||
-- local tmpFile = io.open(fileName, "w")
|
local tmpFile = io.open(fileName, "w")
|
||||||
-- tmpFile:write(buffer:get_text())
|
tmpFile:write(buffer:get_text())
|
||||||
-- local command = M.PATH_TO_DSCANNER
|
local command = M.PATH_TO_DSCANNER
|
||||||
-- .. (character == "." and " --dotComplete " or " --parenComplete ")
|
.. (character == "." and " --dotComplete " or " --parenComplete ")
|
||||||
-- .. fileName .. " " .. buffer.current_pos .. " -I" .. buffer.filename:match(".+[\\/]")
|
.. fileName .. " " .. buffer.current_pos .. " -I" .. buffer.filename:match(".+[\\/]")
|
||||||
-- local p = io.popen(command)
|
local p = io.popen(command)
|
||||||
-- local r = p:read("*a")
|
local r = p:read("*a")
|
||||||
-- if r ~= "\n" then
|
if r ~= "\n" then
|
||||||
-- if character == "." then
|
if character == "." then
|
||||||
-- showCompletionList(r)
|
showCompletionList(r)
|
||||||
-- elseif character == "(" then
|
elseif character == "(" then
|
||||||
-- if r:find("^completions\n") then
|
if r:find("^completions\n") then
|
||||||
-- showCompletionList(r)
|
showCompletionList(r)
|
||||||
-- elseif r:find("^calltips\n.*") then
|
elseif r:find("^calltips\n.*") then
|
||||||
-- r = r:gsub("^calltips\n", "")
|
r = r:gsub("^calltips\n", "")
|
||||||
-- buffer:call_tip_show(buffer.current_pos, r:gsub("\\n", "\n"):gsub("\\t", "\t"):match("(.*)%s+$"))
|
buffer:call_tip_show(buffer.current_pos, r:gsub("\\n", "\n"):gsub("\\t", "\t"):match("(.*)%s+$"))
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- os.remove(fileName)
|
os.remove(fileName)
|
||||||
-- end
|
end
|
||||||
--end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
local function autocomplete()
|
local function autocomplete()
|
||||||
|
|
1
msgpack-d
Submodule
1
msgpack-d
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b0798c79c523afbab770353728ef83253f493bcd
|
Loading…
Add table
Add a link
Reference in a new issue