Skip to content

Commit 5a33054

Browse files
author
Evan Lesmez
committed
Add nvim OIL to latest kickstart upstream
1 parent d350db2 commit 5a33054

File tree

1 file changed

+19
-73
lines changed

1 file changed

+19
-73
lines changed

init.lua

Lines changed: 19 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,4 @@
11
--[[
2-
3-
=====================================================================
4-
==================== READ THIS BEFORE CONTINUING ====================
5-
=====================================================================
6-
======== .-----. ========
7-
======== .----------------------. | === | ========
8-
======== |.-""""""""""""""""""-.| |-----| ========
9-
======== || || | === | ========
10-
======== || KICKSTART.NVIM || |-----| ========
11-
======== || || | === | ========
12-
======== || || |-----| ========
13-
======== ||:Tutor || |:::::| ========
14-
======== |'-..................-'| |____o| ========
15-
======== `"")----------------(""` ___________ ========
16-
======== /::::::::::| |::::::::::\ \ no mouse \ ========
17-
======== /:::========| |==hjkl==:::\ \ required \ ========
18-
======== '""""""""""""' '""""""""""""' '""""""""""' ========
19-
======== ========
20-
=====================================================================
21-
=====================================================================
22-
23-
What is Kickstart?
24-
25-
Kickstart.nvim is *not* a distribution.
26-
27-
Kickstart.nvim is a starting point for your own configuration.
28-
The goal is that you can read every line of code, top-to-bottom, understand
29-
what your configuration is doing, and modify it to suit your needs.
30-
31-
Once you've done that, you can start exploring, configuring and tinkering to
32-
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
33-
or immediately breaking it into modular pieces. It's up to you!
34-
352
If you don't know anything about Lua, I recommend taking some time to read through
363
a guide. One possible example which will only take 10-15 minutes:
374
- https://learnxinyminutes.com/docs/lua/
@@ -41,22 +8,7 @@ What is Kickstart?
418
- :help lua-guide
429
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
4310
44-
Kickstart Guide:
45-
46-
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
47-
48-
If you don't know what this means, type the following:
49-
- <escape key>
50-
- :
51-
- Tutor
52-
- <enter key>
53-
54-
(If you already know the Neovim basics, you can skip this step.)
55-
56-
Once you've completed that, you can continue working through **AND READING** the rest
57-
of the kickstart init.lua.
58-
59-
Next, run AND READ `:help`.
11+
Run AND READ `:help`.
6012
This will open up a help window with some basic information
6113
about reading, navigating and searching the builtin help documentation.
6214
@@ -77,11 +29,6 @@ Kickstart Guide:
7729
for when you are first encountering a few different constructs in your Neovim config.
7830
7931
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
80-
81-
I hope you enjoy your Neovim journey,
82-
- TJ
83-
84-
P.S. You can delete this when you're done too. It's your config now! :)
8532
--]]
8633

8734
-- Set <space> as the leader key
@@ -91,33 +38,23 @@ vim.g.mapleader = ' '
9138
vim.g.maplocalleader = ' '
9239

9340
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
41+
vim.g.have_nerd_font = true
9542

9643
-- [[ Setting options ]]
9744
-- See `:help vim.opt`
9845
-- NOTE: You can change these options as you wish!
9946
-- For more options, you can see `:help option-list`
10047

101-
-- Make line numbers default
10248
vim.opt.number = true
103-
-- You can also add relative line numbers, to help with jumping.
104-
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
49+
50+
vim.opt.relativenumber = true
10651

10752
-- Enable mouse mode, can be useful for resizing splits for example!
10853
vim.opt.mouse = 'a'
10954

11055
-- Don't show the mode, since it's already in the status line
11156
vim.opt.showmode = false
11257

113-
-- Sync clipboard between OS and Neovim.
114-
-- Schedule the setting after `UiEnter` because it can increase startup-time.
115-
-- Remove this option if you want your OS clipboard to remain independent.
116-
-- See `:help 'clipboard'`
117-
vim.schedule(function()
118-
vim.opt.clipboard = 'unnamedplus'
119-
end)
120-
12158
-- Enable break indent
12259
vim.opt.breakindent = true
12360

@@ -665,15 +602,15 @@ require('lazy').setup({
665602
local servers = {
666603
-- clangd = {},
667604
-- gopls = {},
668-
-- pyright = {},
605+
pyright = {},
669606
-- rust_analyzer = {},
670607
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
671608
--
672609
-- Some languages (like typescript) have entire language plugins that can be useful:
673610
-- https://github.com/pmizio/typescript-tools.nvim
674611
--
675612
-- But for many setups, the LSP (`ts_ls`) will work just fine
676-
-- ts_ls = {},
613+
ts_ls = {},
677614
--
678615

679616
lua_ls = {
@@ -883,9 +820,6 @@ require('lazy').setup({
883820
},
884821
}
885822

886-
-- Load the colorscheme here.
887-
-- Like many other themes, this one has different styles, and you could load
888-
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
889823
vim.cmd.colorscheme 'tokyonight-night'
890824
end,
891825
},
@@ -955,7 +889,17 @@ require('lazy').setup({
955889
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
956890
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
957891
},
958-
892+
{
893+
'stevearc/oil.nvim',
894+
---@module 'oil'
895+
---@type oil.SetupOpts
896+
opts = {},
897+
-- Optional dependencies
898+
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
899+
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
900+
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
901+
lazy = false,
902+
},
959903
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
960904
-- init.lua. If you want these files, they are in the repository, so you can just download them and
961905
-- place them in the correct locations.
@@ -1004,5 +948,7 @@ require('lazy').setup({
1004948
},
1005949
})
1006950

951+
require('oil').setup()
952+
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
1007953
-- The line beneath this is called `modeline`. See `:help modeline`
1008954
-- vim: ts=2 sts=2 sw=2 et

0 commit comments

Comments
 (0)