-
Notifications
You must be signed in to change notification settings - Fork 257
[Articles] Getting started setting up Neovim for Swift #675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Articles] Getting started setting up Neovim for Swift #675
Conversation
This is an article on setting up Neovim for Swift development. It covers setting up a package manager, LSP, auto-completions, snippets, and finally some helpful autocommands.
| LSP-driven autocompletion with `nvim-cmp`, and snippets with `LuaSnip`. Then | ||
| we'll finish with some autocommands that are useful if you need to read | ||
| swiftinterface files or find yourself reading SIL. If you already have Neovim, | ||
| Swift, and a package manager installed, you can skip down to setting up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a "Note" or a return here to separate it from the previous sentence to call out they can skip this step if already installed.
Note: If you already have Neovim, Swift, and a package manager installed, you can skip down...
|
|
||
| Alternatively, the neovim github repository has downloadable packages with the | ||
| latest versions. Instructions are available at | ||
| https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider embedding long GitHub links using the specific name of the section to avoid confusion and add clarity. For example in the sentence, "Alternatively, the neovim GitHub repository has downloadable packages with the
latest versions. See Install from download for more information."
| $ tar xf swift-5.10-RELEASE-ubuntu22.04.tar.gz | ||
| ``` | ||
|
|
||
| That drops a `swift-5.10-RELEASE-ubuntu22.04/usr` directory in our Downloads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Downloads part of the UI? If so, consider changing to Downloads. If not part of the UI, but is a placeholder, you can use italics to call it out: Downloads
|
Alright, try that introduction.
Still need to think about the Install section. There are several ways and I didn't want to get bogged down in the details of installing Swift or Neovim for each platform given that I'm already linking to Neovim's install page which lists out the different ways to install Neovim on each platform. Swift, yeah, I'll look into that. |
| $ cd ~/Downloads | ||
| $ wget https://download.swift.org/swift-5.10-release/ubuntu2204/swift-5.10-RELEASE/swift-5.10-RELEASE-ubuntu22.04.tar.gz | ||
| $ tar xf swift-5.10-RELEASE-ubuntu22.04.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we don't have a good story for that at the moment unfortunately
The console code-block language recognizes the prompt. With recent changes to the CSS, things marked as part of the prompt aren't selectable making it easier to copy-paste commands.
These are the names of the plugins, replacing backticks with italicizing the plugin name.
It's a little easier to understand what is going on looking at the title of the issues about dynamic registration and neovim than the raw link text.
| author: [etcwilde] | ||
| --- | ||
|
|
||
| Neovim is a modern reimplementation of _Vi IMproved (vim)_, a popular terminal-based text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mixed feelings on expanding vim. It's technically not wrong, but I don't think it helps with comprehension and makes it a little awkward to read. Thoughts? @al45tair, what do you think? Maybe I've been looking at this for too long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. The recommendation is based on standard writing style guidelines. Exceptions can be made if your target audience already understands the terminology and definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably make sure that I spelled it Vim, rather than in all lowercase, unless it's a command in which case vim. I don't think I'd expand it — I think it's a name at this point. It's also a little tricky to expand, because vi was a shortening of VIsual, so vim is a play on words — it's both VIsual and IMproved.
In any event, I think the audience is likely familiar with Vim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Having read through it, a few times, I don't mind the expansion either, so if you want to leave it how it is, that's fine by me.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neo-VIsual-IMproved (Neovim) intensifies. No, I think that looks silly and I think that will actually confuse more people than it helps.
I'll go ahead and capitalize the name though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the majority vote. Thanks!
Removing the section on downloading the tarball and replacing it with a reference back to the swift.org installation page.
Fixing capitalization on Vim and Vi. Also removing the expansion of Vim. It's the name of the tool at this point and folks reading this document should be familiar with it, or at the very least, "VIsual IMproved", is not particularly enlightening if you don't know what it is.
Moving the link to the Neovim install page up for that folks who are not using Ubuntu.
| That's not very exciting to look at, so I've added a few additional plugins to | ||
| make it look more appealing. | ||
|
|
||
| To check that it's working, launch Neovim. You should first see an error saying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last nit ... consider formatting for easier readability:
"To check that it's working:
- Launch Neovim.
You should first see an error saying that there were no specs found for module plugins. This just means there aren't any plugins. - Press Enter and type,
:Lazy.
lazy.nvim will list the plugins loaded. There should only be one right now: "lazy.nvim". This is lazy.nvim tracking and updating itself. - From the lazy.nvim menu, press
Ito install new plugins.
Uupdates the plugins andXdeletes any plugins that lazy.nvim installed, but are no longer being tracked in your configuration."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There, I broke up apart the last point a bit further so that each button is a separate element.
Something I'm noticing, if I try to number them, the website generator seems very intent on renumbering all of the points as 1. so I left them as an unordered list. Will that work?
To check that it's working:
-
Launch Neovim.
You should first see an error saying that there were no specs found for
module plugins. This just means that there aren't any plugins. -
Press Enter and type,
:Lazy.lazy.nvim lists the plugins installed. There should only be one right now:
"lazy.nvim". This is lazy.nvim tracking and updating itself. -
We can manage out plugins through the lazy.nvim menu.
- Pressing
Iwill install new plugins. - Pressing
Uwill update installed plugins. - Pressing
Xwill delete any plugins that lazy.nvim installed, but are
no longer tracked in your configuration.
- Pressing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works and looks good. Thanks.
28c1d45 to
d219e58
Compare
Answering some review feedback to split up some of the longer paragraphs.
d219e58 to
02c4ab9
Compare
|
@swift-ci please test |
|
lgtm - thanks!! |
This is an article on setting up Neovim for Swift development. It covers setting up a package manager, LSP, auto-completions, snippets, and finally some helpful autocommands.
rdar://127610592