mirror of
https://github.com/runyanjake/dotfiles.git
synced 2025-10-05 06:07:30 -07:00
Remove treesitter, fix colorscheme, add instructions for Java JDTLS config.
This commit is contained in:
parent
71fcb7dd81
commit
66bdf283aa
@ -3,59 +3,86 @@ 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
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Install Neovim if not installed.
|
### Configuration
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Back up existing nvim config
|
4. Link config files to the expected path under `~/.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, you need to manually get rid of stuff in `~/.local/share/nvim` before reinstalling everything.
|
If uninstalling/reinstalling, 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.
|
||||||
@ -69,15 +96,17 @@ 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-language-server`
|
#### Java
|
||||||
- `python-lsp-server`
|
I installed this via :LazyExtras. Search for `lang.java`.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
### Clipboard Support
|
### Clipboard Support
|
||||||
By default LazyVim can't copy things to the clipboard.
|
By default LazyVim can't copy things to the clipboard.
|
||||||
|
10
lazyvim/lazyvim.json
Normal file
10
lazyvim/lazyvim.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.lang.java"
|
||||||
|
],
|
||||||
|
"install_version": 8,
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "10960"
|
||||||
|
},
|
||||||
|
"version": 8
|
||||||
|
}
|
15
lazyvim/lua/plugins/catppuccin.lua
Normal file
15
lazyvim/lua/plugins/catppuccin.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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,
|
||||||
|
},
|
||||||
|
}
|
@ -1,26 +0,0 @@
|
|||||||
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