1"use strict";(self.webpackChunklunarvim=self.webpackChunklunarvim||[]).push([[535],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},c=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),c=s(n),m=a,d=c["".concat(u,".").concat(m)]||c[m]||g[m]||i;return n?r.createElement(d,l(l({ref:t},p),{},{components:n})):r.createElement(d,l({ref:t},p))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var s=2;s<i;s++)l[s]=n[s];return r.createElement.apply(null,l)}return r.createElement.apply(null,n)}c.displayName="MDXCreateElement"},9052:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>g,frontMatter:()=>i,metadata:()=>o,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));const i={},l="Julia",o={unversionedId:"languages/julia",id:"version-1.2/languages/julia",t
1itle:"Julia",description:"Install Syntax Highlighting",source:"@site/versioned_docs/version-1.2/languages/julia.md",sourceDirName:"languages",slug:"/languages/julia",permalink:"/docs/1.2/languages/julia",draft:!1,editUrl:"https://github.com/LunarVim/lunarvim.org/tree/master/versioned_docs/version-1.2/languages/julia.md",tags:[],version:"1.2",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"JSON",permalink:"/docs/1.2/languages/json"},next:{title:"Lua",permalink:"/docs/1.2/languages/lua"}},u={},s=[{value:"Install Syntax Highlighting",id:"install-syntax-highlighting",level:2},{value:"Install Language Server",id:"install-language-server",level:2},{value:"Supporting Plugins",id:"supporting-plugins",level:2},{value:"Pro Tip",id:"pro-tip",level:2}],p={toc:s};function g(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"julia"},"Julia"),(0,a.kt)("h2",{id:"install-syntax-highlighting"},"Install Syntax Highlighting"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-vim"},":TSInstall julia\n")),(0,a.kt)("h2",{id:"install-language-server"},"Install Language Server"),(0,a.kt)("p",null,"The Juila language server, LanguageServer.jl, needs to be manually installed.\nTo install LanguageServer.jl in the location where ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#julials"},"nvim-lspconfig\nexpects"),"\nrun the following terminal command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add(\"LanguageServer\")'\n")),(0,a.kt)("p",null,"Create the file ",(0,a.kt)("inlineCode",{parentName:"p"},"~/.config/lvim/ftplugin/julia.lua")," with the following line to\nstart the language server when opening Julia files."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-lua"},"local opts = {}\n-- re-use common lsp configurations (keybindings, buffer-highlight and cmp integration)\nopts = require(\"lvim.lsp\").get_common_opts()\nrequire('lspconfig').julials.setup(opts)\n")),(0,a.kt)("h2",{id:"supporting-plugins"},"Supporting Plugins"),(0,a.kt)("p",null,"For Latex-to-Unicode substitutions, block-wise movements, and other niceties for\nwriting Julia, install the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/JuliaEditorSupport/julia-vim"},"julia-vim\n")," plugin."),(0,a.kt)("h2",{id:"pro-tip"},"Pro Tip"),(0,a.kt)("p",null,"To leverage the\n",(0,a.kt)("a",{parentName:"p",href:"https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.edit-Tuple%7BAny%7D"},"edit"),"\nfunctionality with LunarVim use the\n",(0,a.kt)("a",{parentName:"p",href:"https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.define_editor"},"define_editor"),"\nmethod in ",(0,a.kt)("inlineCode",{parentName:"p"},"~/.julia/config/startup.jl")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-julia"},'using InteractiveUtils\n\nENV["JULIA_EDITOR"] = "lvim"\n\nInteractiveUtils.define_editor(\n r"lvim", wait=true) do cmd, path, line\n `$cmd +$line $path`\nend\n')))}g.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.