mirror of
https://github.com/runyanjake/dotfiles.git
synced 2025-10-05 14:17:30 -07:00
Compare commits
No commits in common. "3b7514545ecb0bae5228760b6fc682b36e35b8a6" and "71fcb7dd81c9a3c9edf57fa1ba7aa03f0bdebe51" have entirely different histories.
3b7514545e
...
71fcb7dd81
@ -3,86 +3,59 @@ My LazyVim config, a sequel to runyanjake/nvim.
|
|||||||
Based off of `https://github.com/LazyVim/starter`.
|
Based off of `https://github.com/LazyVim/starter`.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
0. The OS may not be bundled with GCC which is required for neovim variants. It is part of `build-essential`, a bundle of useful build tools.
|
||||||
### Configure X11 Forwarding (For clipboard access over SSH)
|
|
||||||
Confirm on your client, and when ssh'd into remote, that `echo $DISPLAY` returns `:0` or `:1`.
|
|
||||||
|
|
||||||
Install dependencies:
|
|
||||||
```
|
|
||||||
sudo apt install xauth x11-apps libx11-dev libxkbfile-dev libxtst-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Edit SSH Daemon config to allow X11 forwarding:
|
|
||||||
```
|
|
||||||
sudo vim /etc/ssh/sshd_config
|
|
||||||
|
|
||||||
X11Forwarding yes
|
|
||||||
X11DisplayOffset 10
|
|
||||||
X11UseLocalhost yes
|
|
||||||
```
|
|
||||||
|
|
||||||
Reminder to connect using -X flag e.g. `ssh -X user@hostname` to make use of our configuration.
|
|
||||||
|
|
||||||
Validate while ssh'd to server by seeing if `echo $DISPLAY` returns something along the lines of `localhost:10.0`. Or try `xclock`.
|
|
||||||
|
|
||||||
### Install Neovim
|
|
||||||
Build Neovim from source so that we can ensure clipboard support.
|
|
||||||
|
|
||||||
#### Build Dependencies
|
|
||||||
This requires the proper packages to be installed _at the time of build_ so install the X11 dependencies above.
|
|
||||||
|
|
||||||
Also install these system clipboard tools:
|
|
||||||
```
|
|
||||||
sudo apt install xclip xsel
|
|
||||||
sudo apt install wl-clipboard # If using wayland, I am not.
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Build Steps
|
|
||||||
```
|
|
||||||
git clone https://github.com/neovim/neovim.git
|
|
||||||
cd neovim
|
|
||||||
git checkout stable
|
|
||||||
git clean -fdx # If we already cloned/built and need to clean old build files.
|
|
||||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
|
||||||
sudo make install
|
|
||||||
```
|
|
||||||
|
|
||||||
Test that clipboard support is available.
|
|
||||||
```
|
|
||||||
nvim
|
|
||||||
:echo has('clipboard')
|
|
||||||
```
|
|
||||||
OR
|
|
||||||
```
|
|
||||||
nvim --version | grep clipboard
|
|
||||||
```
|
|
||||||
This doesn't work for me but you would see the following:
|
|
||||||
```
|
|
||||||
+clipboard
|
|
||||||
+xterm_clipboard
|
|
||||||
```
|
|
||||||
|
|
||||||
### Misc Dependencies
|
|
||||||
Sometimes GCC is required for some nvim variants.
|
|
||||||
```
|
```
|
||||||
sudo apt install build-essential
|
sudo apt install build-essential
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
1. Install Neovim if not installed.
|
||||||
|
Homebrew:
|
||||||
|
```
|
||||||
|
brew install neovim
|
||||||
|
```
|
||||||
|
Ubuntu (installing newer version of neovim):
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install neovim
|
||||||
|
```
|
||||||
|
|
||||||
4. Link config files to the expected path under `~/.config`.
|
2. Back up existing nvim config
|
||||||
|
```
|
||||||
|
mv ~/.config/nvim ~/.config/nvim_BAK
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Clone this repo to wherever you're gonna keep it.
|
||||||
|
```
|
||||||
|
gh repo clone runyanjake/lazyvim ~/repositories/lazyvim
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Link all nvim related items to the nvim config folder.
|
||||||
```
|
```
|
||||||
mkdir ~/.config/nvim
|
mkdir ~/.config/nvim
|
||||||
ln -sfn /path/to/dotfiles/lazyvim/stylua.toml ~/.config/nvim/stylua.toml
|
ln -sfn /path/to/dotfiles/lazyvim/stylua.toml ~/.config/nvim/stylua.toml
|
||||||
ln -sfn /path/to/dotfiles/lazyvim/lua ~/.config/nvim/lua
|
ln -sfn /path/to/dotfiles/lazyvim/lua ~/.config/nvim/lua
|
||||||
ln -sfn /path/to/dotfiles/lazyvim/init.lua ~/.config/nvim/init.lua
|
ln -sfn /path/to/dotfiles/lazyvim/init.lua ~/.config/nvim/init.lua
|
||||||
ln -sfn /path/to/dotfiles/lazyvim.json ~/.config/nvim/lazyvim.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Start nvim, and let all the packages install. Done!
|
5. Start nvim, and let all the packages install. Done!
|
||||||
|
|
||||||
|
## Reinstallation
|
||||||
|
Sometimes you gotta uninstall and reinstall, here are all the steps in one convenient place:
|
||||||
|
```
|
||||||
|
sudo apt remove neovim
|
||||||
|
sudo rm -r ~/.local/share/nvim/
|
||||||
|
sudo rm -r ~/.config/nvim
|
||||||
|
sudo apt install neovim
|
||||||
|
|
||||||
|
mkdir ~/.config/nvim
|
||||||
|
ln -sfn /path/to/dotfiles/lazyvim/stylua.toml ~/.config/nvim/stylua.toml
|
||||||
|
ln -sfn /path/to/dotfiles/lazyvim/lua ~/.config/nvim/lua
|
||||||
|
ln -sfn /path/to/dotfiles/lazyvim/init.lua ~/.config/nvim/init.lua
|
||||||
|
```
|
||||||
|
|
||||||
## Reminders
|
## Reminders
|
||||||
If uninstalling/reinstalling, you need to manually get rid of stuff in `~/.local/share/nvim` before reinstalling everything.
|
If uninstalling, you need to manually get rid of stuff in `~/.local/share/nvim` before reinstalling everything.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
Some plugins depend on other packages.
|
Some plugins depend on other packages.
|
||||||
@ -96,21 +69,15 @@ This is used for the nvim-tree (?) search bar in the explorer panel.
|
|||||||
sudo apt install fd-find
|
sudo apt install fd-find
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2.
|
||||||
|
|
||||||
## Plugins/Addons/Extras
|
## Plugins/Addons/Extras
|
||||||
|
|
||||||
### Mason (Language Servers)
|
### Mason (Language Servers)
|
||||||
Enter Mason UI view from nvim: `:Mason`. Enter `g?` to toggle help page if you've forgotten the hotkeys.
|
Enter Mason UI view from nvim: `:Mason`. Enter `g?` to toggle help page if you've forgotten the hotkeys.
|
||||||
|
Some ideas of what to install:
|
||||||
#### Java
|
- `java-language-server`
|
||||||
I installed this via :LazyExtras. Search for `lang.java`, which installs required plugins.
|
- `python-lsp-server`
|
||||||
|
|
||||||
This creates or adds to ~/.config/nvim/lazyvim.json. It is one of the config files we are checking into this project, so copy it in with the other config files.
|
|
||||||
|
|
||||||
Note that for some projects this will add some project files like what you would see in Eclipse (as JDTLS is related to the project).
|
|
||||||
|
|
||||||
#### Python
|
|
||||||
I installed this with :LazyExtras. Search for `lang.python`, which installs required plugins.
|
|
||||||
This updates ~/.config/nvim/lazyvim.json.
|
|
||||||
|
|
||||||
### Clipboard Support
|
### Clipboard Support
|
||||||
By default LazyVim can't copy things to the clipboard.
|
By default LazyVim can't copy things to the clipboard.
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extras": [
|
|
||||||
"lazyvim.plugins.extras.lang.java",
|
|
||||||
"lazyvim.plugins.extras.lang.python"
|
|
||||||
],
|
|
||||||
"install_version": 8,
|
|
||||||
"news": {
|
|
||||||
"NEWS.md": "10960"
|
|
||||||
},
|
|
||||||
"version": 8
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
require("catppuccin").setup({
|
|
||||||
flavour = "macchiato",
|
|
||||||
transparent_background = false,
|
|
||||||
float = { transparent = false, solid = true },
|
|
||||||
})
|
|
||||||
vim.cmd.colorscheme("catppuccin")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
26
lazyvim/lua/plugins/colorscheme.lua
Normal file
26
lazyvim/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
-- Tokyo Night Theme
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Catppuccin theme
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Set the theme
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "catppuccin-macchiato",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user