summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md142
1 files changed, 76 insertions, 66 deletions
diff --git a/README.md b/README.md
index fd2cefc2..bf5c1c79 100644
--- a/README.md
+++ b/README.md
@@ -28,19 +28,32 @@ Make sure you have the newest version of Neovim (0.5).
bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/master/utils/installer/install.sh)
```
-If you help to develop Lunarvim, you can install a specific branch branch directly
+### Installing
+The following command installs LunarVim. Change `LVBRANCH` to the branch you'd like to install. `master` for the stable branch and `rolling` for the latest changes.
``` bash
LVBRANCH=rolling bash <(curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh)
```
+### BREAKING CHANGE on the rolling branch
+* The latest changes to LunarVim require you to [remove it completely](https://github.com/ChristianChiarulli/LunarVim/wiki/Uninstalling-LunarVim) before upgrading
+* Going forward LunarVim will no longer reside in the nvim configuration folder. LunarVim has been moved to `~/.local/share/lunarvim`.
+* To launch Lunarvim use the new `lvim` command. `nvim` will only launch standard neovim.
+* Your personal configuration file (`lv-config.lua`) can now be found in `~/.config/lvim`. You can initialize this folder as a git repository to track changes to your configuration files.
+* If you want to keep launching LunarVim with the `nvim` command, add an alias entry to your shell's config file: `alias nvim=lvim`. To temporarily revert to the default `nvim` prefix it with a backslash `\nvim`.
+* Many options formerly available in `lv-config.lua` have been renamed. For details [look here](https://github.com/ChristianChiarulli/LunarVim/wiki/Breaking-changes-in-rolling)
+
+### Fixing installation problems
If your installation is stuck on `Ok to remove? [y/N]`, it means there are some leftovers, \
-you can run the script with `--overwrite` but be warned this will remove the following folder:
-- `~/.config/nvim`
+you can run the script with `--overwrite` but be warned this will remove the following folders:
- `~/.cache/nvim`
-- `~/.local/share/nvim/site/pack/packer`
+- `~/.config/nvim` #Removed only on Master Branch
+- `~/.local/share/nvim/site/pack/packer` #Removed only on Master Branch
+- `~/.local/share/lunarvim` #Removed only on Rolling Branch
+- `~/.config/lvim` #Removed only on Rolling Branch
```bash
-curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh| LVBRANCH=rolling bash -s -- --overwrite
+curl -s https://raw.githubusercontent.com/ChristianChiarulli/lunarvim/rolling/utils/installer/install.sh | LVBRANCH=rolling bash -s -- --overwrite
```
+then run nvim and wait for treesitter to finish the installation
## Installing LSP for your language
@@ -49,85 +62,76 @@ Just enter `:LspInstall` followed by `<TAB>` to see your options
**NOTE** I recommend installing `lua` for autocomplete in `lv-config.lua`
+For the julia language server look [here](https://github.com/ChristianChiarulli/LunarVim/wiki/Enabling-a-language-server#julia-support)
+
## Configuration file
-To activate other plugins and language features use the `lv-config.lua` file provided in the `nvim` folder (`~/.config/nvim/lv-config.lua`)
+To activate other plugins and language features use the `lv-config.lua` file provided in the `nvim` folder (`~/.config/nvim/lv-config.lua`) in the master branch or (`~/.config/lvim/lv-config.lua`) on rolling
Example:
```lua
--- O is the global options object
-
--- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general
--- O.default_options.wrap = true -- wrap long lines
-O.completion.autocomplete = true
-O.default_options.relativenumber = true
-O.colorscheme = 'spacegray'
-O.default_options.timeoutlen = 100
-O.leader_key = ' '
-
--- After changing plugin config it is recommended to run :PackerCompile
-O.plugin.dashboard.active = true
-O.plugin.floatterm.active = true
-O.plugin.zen.active = true
+lvim.format_on_save = true
+lvim.lint_on_save = true
+lvim.colorscheme = "spacegray"
+
+lvim.builtin.compe.autocomplete = true
+
+-- keymappings
+lvim.leader = "space"
+
+-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
+lvim.builtin.dashboard.active = true
+lvim.builtin.terminal.active = true
-- if you don't want all the parsers change this to a table of the ones you want
-O.treesitter.ensure_installed = "all"
-O.treesitter.ignore_install = {"haskell"}
-O.treesitter.highlight.enabled = true
-
--- lua
-O.lang.lua.autoformat = false
-O.lang.lua.formatter = 'lua-format'
-
--- javascript
-O.lang.tsserver.formatter = 'prettier'
-O.lang.tsserver.linter = nil
-O.lang.tsserver.autoformat = true
-
--- python
-O.lang.python.isort = true
-O.lang.python.diagnostics.virtual_text = true
-O.lang.python.analysis.use_library_code_types = true
--- to change default formatter from yapf to black
--- O.lang.python.formatter.exe = "black"
--- O.lang.python.formatter.args = {"-"}
-
--- go
--- to change default formatter from gofmt to goimports
--- O.lang.formatter.go.exe = "goimports"
+lvim.builtin.treesitter.ensure_installed = "maintained"
+lvim.builtin.treesitter.ignore_install = { "haskell" }
+lvim.builtin.treesitter.highlight.enabled = true
--- Additional Plugins
--- O.user_plugins = {
--- {"folke/tokyonight.nvim"},
--- {
--- "ray-x/lsp_signature.nvim",
--- config = function()
--- require"lsp_signature".on_attach()
--- end,
--- event = "InsertEnter"
--- },
--- }
+lvim.lang.python.formatter.exe = "black"
+lvim.lang.python.linters = ""
--- }
+lvim.lsp.diagnostics.virtual_text = false
+
+-- Additional Plugins
+lvim.plugins = {
+ {"lunarvim/colorschemes"},
+ {"folke/tokyonight.nvim"}, {
+ "ray-x/lsp_signature.nvim",
+ config = function() require"lsp_signature".on_attach() end,
+ event = "InsertEnter"
+ }
+}
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
--- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
+-- lvim.autocommands.custom_groups = {
+-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
+-- }
-- Additional Leader bindings for WhichKey
--- O.user_which_key = {
--- A = {
--- name = "+Custom Leader Keys",
--- a = { "<cmd>echo 'first custom command'<cr>", "Description for a" },
--- b = { "<cmd>echo 'second custom command'<cr>", "Description for b" },
--- },
+-- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
+-- lvim.builtin.which_key.mappings["t"] = {
+-- name = "+Trouble",
+-- r = { "<cmd>Trouble lsp_references<cr>", "References" },
+-- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
+-- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
+-- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
+-- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
+-- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
-- }
--- To link your init.vim (until you find Lua replacements)
--- vim.cmd('source ' .. CONFIG_PATH .. '/lua/lv-user/init.vim')
```
+In case you want to see all the settings inside LunarVim, run the following:
+
+```bash
+cd /tmp
+lvim --headless +'lua require("utils").generate_settings()' +qa && sort -o lv-settings.lua{,}
+```
+and then inspect `/tmp/lv-settings.lua` file
+
## Updating LunarVim
In order to update you should be aware of three things `Plugins`, `LunarVim` and `Neovim`
@@ -141,10 +145,16 @@ To update plugins:
To update LunarVim:
```bash
+# Master Branch
cd ~/.config/nvim && git pull
+:PackerSync
+
+# Rolling Branch
+cd ~/.local/share/lunarvim/lvim && git pull
+:PackerSync
```
-To update Neovim use your package manager
+To update Neovim use your package manager or [compile from source](https://github.com/ChristianChiarulli/LunarVim/wiki/Installation#get-the-latest-version-of-neovim)
## Project Goals