mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-02 17:14:56 +02:00
move julia stuff to core/lang (#1023)
This commit is contained in:
parent
fe69c43d66
commit
e82fc442d0
3 changed files with 54 additions and 14 deletions
49
lua/lang/julia.lua
Normal file
49
lua/lang/julia.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
local M = {}
|
||||
|
||||
M.config = function()
|
||||
O.lang.julia = {}
|
||||
end
|
||||
|
||||
M.format = function()
|
||||
-- todo: implement formatters (if applicable)
|
||||
return "no formatters configured!"
|
||||
end
|
||||
|
||||
M.lint = function()
|
||||
-- todo: implement linters (if applicable)
|
||||
return "no linters configured!"
|
||||
end
|
||||
|
||||
M.lsp = function()
|
||||
if require("lv-utils").check_lsp_client_active "julials" then
|
||||
return
|
||||
end
|
||||
-- Add the following lines to a new julia file, e.g. install.jl
|
||||
-- using Pkg
|
||||
-- Pkg.instantiate()
|
||||
-- Run the file you created.
|
||||
-- julia install.jl
|
||||
-- Julia language server will now be installed on your system.
|
||||
|
||||
local cmd = {
|
||||
"julia",
|
||||
"--startup-file=no",
|
||||
"--history-file=no",
|
||||
-- vim.fn.expand "~/.config/nvim/lua/lsp/julia/run.jl",
|
||||
CONFIG_PATH .. "/lua/lsp/julia/run.jl",
|
||||
}
|
||||
require("lspconfig").julials.setup {
|
||||
cmd = cmd,
|
||||
on_new_config = function(new_config, _)
|
||||
new_config.cmd = cmd
|
||||
end,
|
||||
filetypes = { "julia" },
|
||||
}
|
||||
end
|
||||
|
||||
M.dap = function()
|
||||
-- TODO: implement dap
|
||||
return "No DAP configured!"
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue