diff --git a/README.md b/README.md
index c9b9d84e..6d48c18e 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,14 @@ If you are experiencing issues, please make sure you have the latest versions.
### Install External Dependencies
-> **NOTE**
+> **NOTE**
> [Backup](#FAQ) your previous configuration (if any exists)
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
+- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
+ - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
- Language Setup:
- If want to write Typescript, you need `npm`
- If want to write Golang, you will need `go`
@@ -43,6 +45,8 @@ Neovim's configurations are located under the following paths, depending on your
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
+### Install Kickstart
+
Clone kickstart.nvim:
Linux and Mac
@@ -58,13 +62,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
If you're using `cmd.exe`:
```
-git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
+git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
```
If you're using `powershell.exe`
```
-git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
+git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
```
@@ -85,9 +89,7 @@ information about extending and exploring Neovim.
### Getting Started
-See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
-previous version. Note: The install via init.lua is outdated, please follow the
-install instructions in this file instead. An updated video is coming soon.
+[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
### Recommended Steps
@@ -95,11 +97,13 @@ install instructions in this file instead. An updated video is coming soon.
(so that you have your own copy that you can modify) and then installing you
can install to your machine using the methods above.
-> **NOTE**
+> **NOTE**
> Your fork's url will be something like this: `https://github.com//kickstart.nvim.git`
#### Examples of adding popularly requested plugins
+NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
+
Adding autopairs
@@ -192,3 +196,21 @@ This requires:
```lua
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
```
+
+Alternatively one can install gcc and make which don't require changing the config,
+the easiest way is to use choco:
+
+1. install [chocolatey](https://chocolatey.org/install)
+either follow the instructions on the page or use winget,
+run in cmd as **admin**:
+```
+winget install --accept-source-agreements chocolatey.chocolatey
+```
+
+2. install all requirements using choco, exit previous cmd and
+open a new one so that choco path is set, run in cmd as **admin**:
+```
+choco install -y neovim git ripgrep wget fd unzip gzip mingw make
+```
+
+Then continue with the [Install Kickstart](#Install-Kickstart) step.
diff --git a/init.lua b/init.lua
index abeed0f6..f5ec1c43 100644
--- a/init.lua
+++ b/init.lua
@@ -90,6 +90,9 @@ P.S. You can delete this when you're done too. It's your config now! :)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
+-- Set to true if you have a Nerd Font installed
+vim.g.have_nerd_font = false
+
-- [[ Setting options ]]
-- See `:help vim.opt`
-- NOTE: You can change these options as you wish!
@@ -146,8 +149,8 @@ vim.opt.splitright = true
vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace in the editor.
--- See :help 'list'
--- and :help 'listchars'
+-- See `:help 'list'`
+-- and `:help 'listchars'`
vim.opt.list = true
vim.opt.listchars = { tab = 'ยป ', trail = 'ยท', nbsp = 'โฃ' }
@@ -201,7 +204,7 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the lower win
vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' })
-- [[ Basic Autocommands ]]
--- See :help lua-guide-autocommands
+-- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
@@ -234,7 +237,7 @@ vim.opt.rtp:prepend(lazypath)
-- :Lazy update
--
-- NOTE: Here is where you install your plugins.
-require('lazy').setup {
+require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
@@ -274,10 +277,10 @@ require('lazy').setup {
-- lazy loading plugins that don't need to be loaded immediately at startup.
--
-- For example, in the following configuration, we use:
- -- event = 'VeryLazy'
+ -- event = 'VimEnter'
--
- -- which loads which-key after all the UI elements are loaded. Events can be
- -- normal autocommands events (:help autocomd-events).
+ -- which loads which-key before all the UI elements are loaded. Events can be
+ -- normal autocommands events (`:help autocmd-events`).
--
-- Then, because we use the `config` key, the configuration only runs
-- after the plugin has been loaded:
@@ -285,7 +288,7 @@ require('lazy').setup {
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
- event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
+ event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require('which-key').setup()
@@ -309,7 +312,7 @@ require('lazy').setup {
{ -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
- event = 'VeryLazy',
+ event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
@@ -328,10 +331,15 @@ require('lazy').setup {
},
{ 'nvim-telescope/telescope-ui-select.nvim' },
+<<<<<<< HEAD
-- Useful for getting pretty icons, but requires special font.
-- If you already have a Nerd Font, or terminal set up with fallback fonts
-- you can enable this
{ 'nvim-tree/nvim-web-devicons' },
+=======
+ -- Useful for getting pretty icons, but requires a Nerd Font.
+ { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
+>>>>>>> upstream/master
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
@@ -450,7 +458,7 @@ require('lazy').setup {
-- Neovim. This is where `mason` and related plugins come into play.
--
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
- -- and elegantly composed help section, :help lsp-vs-treesitter
+ -- and elegantly composed help section, `:help lsp-vs-treesitter`
-- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with
@@ -741,7 +749,9 @@ require('lazy').setup {
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
- -- Load the colorscheme here
+ -- Load the colorscheme here.
+ -- Like many other themes, this one has different styles, and you could load
+ -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
-- You can configure highlights by doing something like
@@ -750,7 +760,7 @@ require('lazy').setup {
},
-- Highlight todo, notes, etc in comments
- { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
+ { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
{ -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
@@ -758,7 +768,7 @@ require('lazy').setup {
-- Better Around/Inside textobjects
--
-- Examples:
- -- - va) - [V]isually select [A]round [)]parenthen
+ -- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [']quote
-- - ci' - [C]hange [I]nside [']quote
require('mini.ai').setup { n_lines = 500 }
@@ -774,14 +784,15 @@ require('lazy').setup {
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
- statusline.setup()
+ -- set use_icons to true if you have a Nerd Font
+ statusline.setup { use_icons = vim.g.have_nerd_font }
- -- You can confiure sections in the statusline by overriding their
- -- default behavior. For example, here we disable the section for
- -- cursor information because line numbers are already enabled
+ -- You can configure sections in the statusline by overriding their
+ -- default behavior. For example, here we set the section for
+ -- cursor location to LINE:COLUMN
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
- return ''
+ return '%2l:%-2v'
end
-- ... and there is more!
@@ -807,7 +818,7 @@ require('lazy').setup {
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
- -- - Incremental selection: Included, see :help nvim-treesitter-incremental-selection-mod
+ -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end,
@@ -829,9 +840,35 @@ require('lazy').setup {
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
+<<<<<<< HEAD
-- For additional information see: :help lazy.nvim-lazy.nvim-structuring-your-plugins
{ import = 'custom.plugins' },
}
+=======
+ -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
+ -- { import = 'custom.plugins' },
+}, {
+ ui = {
+ -- If you have a Nerd Font, set icons to an empty table which will use the
+ -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table
+ icons = vim.g.have_nerd_font and {} or {
+ cmd = 'โ',
+ config = '๐ ',
+ event = '๐
',
+ ft = '๐',
+ init = 'โ',
+ keys = '๐',
+ plugin = '๐',
+ runtime = '๐ป',
+ require = '๐',
+ source = '๐',
+ start = '๐',
+ task = '๐',
+ lazy = '๐ค ',
+ },
+ },
+})
+>>>>>>> upstream/master
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua
index 957204e8..04df77b3 100644
--- a/lua/kickstart/health.lua
+++ b/lua/kickstart/health.lua
@@ -6,15 +6,16 @@
--]]
local check_version = function()
+ local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
if not vim.version.cmp then
- vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
+ vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
return
end
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
- vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
+ vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else
- vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
+ vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
end
end