You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
1008 B

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
lua << EOF
-- Set LSP keymappings in on_attach (i.e. only in buffers with LSP active)
local on_attach = function(client, bufnr)
opts = { noremap=true, silent=true }
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
end
-- Julia LSP (LanguageServer.jl)
require'lspconfig'.julials.setup({
on_new_config = function(new_config, _)
local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia")
if require'lspconfig'.util.path.is_file(julia) then
new_config.cmd[1] = julia
end
end,
-- This just adds dirname(fname) as a fallback (see nvim-lspconfig#1768).
root_dir = function(fname)
local util = require'lspconfig.util'
return util.root_pattern 'Project.toml'(fname) or util.find_git_ancestor(fname) or
util.path.dirname(fname)
end,
on_attach = on_attach,
})
EOF