Created
May 14, 2025 11:53
-
-
Save dpo/469e66662bbe8d98d783f024cb5de378 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if true then | |
return {} | |
end | |
return { | |
{ | |
"JuliaEditorSupport/julia-vim", | |
}, | |
-- configure julia lsp | |
{ | |
"neovim/nvim-lspconfig", | |
config = function() | |
local function create_capabilities() | |
local capabilities = vim.lsp.protocol.make_client_capabilities() | |
capabilities.textDocument.completion.completionItem.snippetSupport = true | |
capabilities.textDocument.completion.completionItem.preselectSupport = true | |
capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } | |
capabilities.textDocument.completion.completionItem.deprecatedSupport = true | |
capabilities.textDocument.completion.completionItem.insertReplaceSupport = true | |
capabilities.textDocument.completion.completionItem.labelDetailsSupport = true | |
capabilities.textDocument.completion.completionItem.commitCharactersSupport = true | |
capabilities.textDocument.completion.completionItem.resolveSupport = { | |
properties = { "documentation", "detail", "additionalTextEdits" }, | |
} | |
capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown" } | |
capabilities.textDocument.codeAction = { | |
dynamicRegistration = true, | |
codeActionLiteralSupport = { | |
codeActionKind = { | |
valueSet = (function() | |
local res = vim.tbl_values(vim.lsp.protocol.CodeActionKind) | |
table.sort(res) | |
return res | |
end)(), | |
}, | |
}, | |
} | |
return capabilities | |
end | |
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { | |
virtual_text = true, | |
underline = false, | |
signs = true, | |
update_in_insert = false, | |
}) | |
local on_attach = function(client, bufnr) | |
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") | |
end | |
local lspconfig = require("lspconfig") | |
local function lsp_setup(name, config) | |
lspconfig[name].setup(config) | |
end | |
lsp_setup("julials", { | |
on_attach = on_attach, | |
capabilities = create_capabilities(), | |
}) | |
end, | |
}, | |
-- configure julia formatter | |
{ | |
"kdheepak/JuliaFormatter.vim", | |
}, | |
{ | |
"stevearc/conform.nvim", | |
opts = { | |
formatters_by_ft = { | |
["julia"] = { "JuliaFormatter" }, | |
}, | |
}, | |
}, | |
-- configure julia debugger | |
{ | |
"mfussenegger/nvim-dap", | |
dependencies = { | |
"kdheepak/nvim-dap-julia", | |
config = function() | |
require("nvim-dap-julia").setup() | |
end, | |
}, | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
{ | |
"neovim/nvim-lspconfig", | |
opts = { | |
servers = { | |
texlab = { | |
cmd = { "texlab" }, --, "-vvvv", "--log-file", "/tmp/texlab.log" }, | |
settings = { | |
texlab = { | |
rootDirectory = nil, | |
build = { | |
executable = "latexmk", | |
args = { "-shell-escape", "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, | |
onSave = true, | |
forwardSearchAfter = true, | |
}, | |
auxDirectory = ".", | |
forwardSearch = { | |
executable = "/Applications/Skim.app/Contents/SharedSupport/displayline", | |
args = { "-g", "-b", "%l", "%p", "%f" }, | |
}, | |
chktex = { | |
onOpenAndSave = true, | |
onEdit = false, | |
}, | |
diagnosticsDelay = 300, | |
latexFormatter = "none", -- "texlab" is not implemented yet | |
-- latexindent = { | |
-- ['local'] = nil, -- local is a reserved keyword | |
-- modifyLineBreaks = true, | |
-- }, | |
bibtexFormatter = "none", | |
formatterLineLength = 0, | |
}, | |
}, | |
}, | |
}, | |
}, | |
}, | |
{ | |
"f3fora/nvim-texlabconfig", | |
config = function() | |
require("texlabconfig").setup() | |
end, | |
-- ft = { 'tex', 'bib' }, -- Lazy-load on filetype | |
build = "go build -o ~/.local/bin/", | |
-- build = 'go build -o ~/.bin/' -- if e.g. ~/.bin/ is in $PATH | |
}, | |
-- Configure Skim.app sync as follows: | |
-- Preset: Custom | |
-- Command: /Users/dpo/.local/bin/nvim-texlabconfig | |
-- Arguments: -file '%file' -line %line -cache_root ~/.cache/nvim-LazyVim | |
{ | |
"barreiroleo/ltex_extra.nvim", | |
branch = "dev", | |
ft = { "markdown", "tex" }, | |
opts = { | |
---@type string[] | |
-- See https://valentjn.github.io/ltex/supported-languages.html#natural-languages | |
load_langs = { "en-US" }, | |
---@type "none" | "fatal" | "error" | "warn" | "info" | "debug" | "trace" | |
log_level = "trace", | |
---@type string File's path to load. | |
-- The setup will normalice it running vim.fs.normalize(path). | |
-- e.g. subfolder in project root or cwd: ".ltex" | |
-- e.g. cross project settings: vim.fn.expand("~") .. "/.local/share/ltex" | |
path = ".ltex", | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment