Skip to content

Commit 241aa8e

Browse files
author
Evan Lesmez
committed
Merge branch 'kiss' of github.com:evanlesmez/kickstart.nvim into kiss
2 parents 2ec6f65 + 667d50c commit 241aa8e

File tree

1 file changed

+87
-27
lines changed

1 file changed

+87
-27
lines changed

init.lua

Lines changed: 87 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
--[[
2-
If you don't know anything about Lua, I recommend taking some time to read through
3-
a guide. One possible example which will only take 10-15 minutes:
4-
- https://learnxinyminutes.com/docs/lua/
5-
6-
After understanding a bit more about Lua, you can use `:help lua-guide` as a
7-
reference for how Neovim integrates Lua.
8-
- :help lua-guide
9-
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
10-
2+
kickstart nvim
113
Run AND READ `:help`.
124
This will open up a help window with some basic information
135
about reading, navigating and searching the builtin help documentation.
@@ -29,6 +21,9 @@
2921
for when you are first encountering a few different constructs in your Neovim config.
3022
3123
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
24+
25+
I hope you enjoy your Neovim journey,
26+
- TJ
3227
--]]
3328

3429
-- Set <space> as the leader key
@@ -46,7 +41,6 @@ vim.g.have_nerd_font = true
4641
-- For more options, you can see `:help option-list`
4742

4843
vim.opt.number = true
49-
5044
vim.opt.relativenumber = true
5145

5246
-- Enable mouse mode, can be useful for resizing splits for example!
@@ -55,6 +49,14 @@ vim.opt.mouse = 'a'
5549
-- Don't show the mode, since it's already in the status line
5650
vim.opt.showmode = false
5751

52+
-- Sync clipboard between OS and Neovim.
53+
-- Schedule the setting after `UiEnter` because it can increase startup-time.
54+
-- Remove this option if you want your OS clipboard to remain independent.
55+
-- See `:help 'clipboard'`
56+
vim.schedule(function()
57+
-- vim.opt.clipboard = 'unnamedplus'
58+
end)
59+
5860
-- Enable break indent
5961
vim.opt.breakindent = true
6062

@@ -600,18 +602,17 @@ require('lazy').setup({
600602
-- - settings (table): Override the default settings passed when initializing the server.
601603
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
602604
local servers = {
603-
-- clangd = {},
604-
-- gopls = {},
605+
clangd = {},
606+
gopls = {},
605607
pyright = {},
606-
-- rust_analyzer = {},
608+
rust_analyzer = {},
609+
ts_ls = {},
607610
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
608611
--
609612
-- Some languages (like typescript) have entire language plugins that can be useful:
610613
-- https://github.com/pmizio/typescript-tools.nvim
611614
--
612615
-- But for many setups, the LSP (`ts_ls`) will work just fine
613-
ts_ls = {},
614-
--
615616

616617
lua_ls = {
617618
-- cmd = { ... },
@@ -623,10 +624,24 @@ require('lazy').setup({
623624
callSnippet = 'Replace',
624625
},
625626
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
627+
diagnostics = {
628+
globals = {
629+
'vim',
630+
'love',
631+
},
632+
},
626633
-- diagnostics = { disable = { 'missing-fields' } },
634+
workspace = {
635+
library = {
636+
[vim.fn.expand '$VIMRUNTIME/lua'] = true,
637+
[vim.fn.expand '$VIMRUNTIME/lua/vim/lsp'] = true,
638+
['${3rd}/love2d/library'] = true, -- Add Love2D library
639+
},
640+
},
627641
},
628642
},
629643
},
644+
intelephense = {},
630645
}
631646

632647
-- Ensure the servers and tools above are installed
@@ -699,9 +714,8 @@ require('lazy').setup({
699714
lua = { 'stylua' },
700715
-- Conform can also run multiple formatters sequentially
701716
python = { 'isort', 'black' },
702-
--
717+
javascript = { 'prettierd', 'prettier', stop_after_first = true },
703718
-- You can use 'stop_after_first' to run the first available formatter from the list
704-
-- javascript = { "prettierd", "prettier", stop_after_first = true },
705719
},
706720
},
707721
},
@@ -819,7 +833,6 @@ require('lazy').setup({
819833
comments = { italic = false }, -- Disable italics in comments
820834
},
821835
}
822-
823836
vim.cmd.colorscheme 'tokyonight-night'
824837
end,
825838
},
@@ -909,12 +922,12 @@ require('lazy').setup({
909922
-- Here are some example plugins that I've included in the Kickstart repository.
910923
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
911924
--
912-
-- require 'kickstart.plugins.debug',
913-
-- require 'kickstart.plugins.indent_line',
914-
-- require 'kickstart.plugins.lint',
915-
-- require 'kickstart.plugins.autopairs',
916-
-- require 'kickstart.plugins.neo-tree',
917-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
925+
--require 'kickstart.plugins.debug',
926+
require 'kickstart.plugins.indent_line',
927+
require 'kickstart.plugins.lint',
928+
require 'kickstart.plugins.autopairs',
929+
require 'kickstart.plugins.neo-tree',
930+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
918931

919932
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
920933
-- This is the easiest way to modularize your config.
@@ -926,6 +939,31 @@ require('lazy').setup({
926939
-- Or use telescope!
927940
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
928941
-- you can continue same window with `<space>sr` which resumes last telescope search
942+
943+
{
944+
'stevearc/oil.nvim', ---@module 'oil'
945+
---@type oil.SetupOpts
946+
opts = {},
947+
-- Optional dependencies
948+
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
949+
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
950+
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
951+
lazy = false,
952+
},
953+
{
954+
'ray-x/go.nvim',
955+
dependencies = { -- optional packages
956+
'ray-x/guihua.lua',
957+
'neovim/nvim-lspconfig',
958+
'nvim-treesitter/nvim-treesitter',
959+
},
960+
config = function()
961+
require('go').setup()
962+
end,
963+
event = { 'CmdlineEnter' },
964+
ft = { 'go', 'gomod' },
965+
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
966+
},
929967
}, {
930968
ui = {
931969
-- If you are using a Nerd Font: set icons to an empty table which will use the
@@ -948,7 +986,29 @@ require('lazy').setup({
948986
},
949987
})
950988

951-
require('oil').setup()
989+
990+
require('oil').setup {
991+
default_file_explorer = true,
992+
columns = {
993+
'icon',
994+
-- 'permissions',
995+
'size',
996+
-- 'mtime',
997+
},
998+
}
952999
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
953-
-- The line beneath this is called `modeline`. See `:help modeline`
954-
-- vim: ts=2 sts=2 sw=2 et
1000+
1001+
vim.opt['tabstop'] = 4
1002+
vim.opt['softtabstop'] = 4
1003+
vim.opt['shiftwidth'] = 4
1004+
vim.opt['expandtab'] = true
1005+
1006+
vim.api.nvim_create_autocmd('BufEnter', {
1007+
pattern = '*.gd',
1008+
callback = function()
1009+
vim.bo.tabstop = 4
1010+
vim.bo.softtabstop = 4
1011+
vim.bo.shiftwidth = 4
1012+
vim.bo.expandtab = true
1013+
end,
1014+
})

0 commit comments

Comments
 (0)