diff --git a/README.md b/README.md index 92841110..5363c0cb 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,5 @@ # kickstart.nvim -## Introduction - -A starting point for Neovim that is: - -* Small -* Single-file -* Completely Documented - -**NOT** a Neovim distribution, but instead a starting point for your configuration. - ## Installation ### Install Neovim diff --git a/init.lua b/init.lua index 1427b6c7..02269d49 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -664,16 +664,16 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, + gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, + ts_ls = {}, -- lua_ls = { @@ -986,12 +986,12 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lazy-lock.json b/lazy-lock.json index 281db0f8..e90d6e61 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,21 +1,32 @@ { "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "gitsigns.nvim": { "branch": "main", "commit": "356df59308d8b87486644d2324d7558ac0f3db36" }, + "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, - "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.nvim": { "branch": "main", "commit": "64e95aa77587d04f97a5579b2106a82a08a7d968" }, + "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" }, + "nvim-dap-go": { "branch": "main", "commit": "5511788255c92bdd845f8d9690f88e2e0f0ff9f2" }, + "nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, + "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" }, "nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-treesitter": { "branch": "master", "commit": "679883ad31f1752cac92a4ca182cee8b2751d4f1" }, + "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..462d4a5a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,117 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information + +-- disable netrw at the very start of your init.lua +-- vim.g.loaded_netrw = 1 +-- vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- Kickstart stuff? +vim.opt.guicursor = '' + +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.wrap = false + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv 'HOME' .. '/.vim/undodir' +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 12 +vim.opt.signcolumn = 'yes' +vim.opt.isfname:append '@-@' + +vim.opt.updatetime = 50 + +vim.opt.colorcolumn = '80' + +local opts = { noremap = true, silent = true } + +local keymap = vim.keymap.set + +-- Exit file +-- vim.keymap.set("n", "pv", vim.cmd.Ex) +-- vim.api.nvim_set_keymap('n', 'pv', ':bd', { noremap = true, silent = true }) +-- Vertical Movement +vim.keymap.set('n', '', 'zz') +vim.keymap.set('n', '', 'zz') +vim.keymap.set('n', 'n', 'nzzzv') +vim.keymap.set('n', 'N', 'Nzzzv') + +-- Better window navigation +keymap('n', '', 'h', opts) +keymap('n', '', 'j', opts) +keymap('n', '', 'k', opts) +keymap('n', '', 'l', opts) + +-- Resize with arrows +keymap('n', '', ':resize -2', opts) +keymap('n', '', ':resize +2', opts) +keymap('n', '', ':vertical resize -2', opts) +keymap('n', '', ':vertical resize +2', opts) + +-- Navigate buffers +keymap('n', '', ':bnext', opts) +keymap('n', '', ':bprevious', opts) + +-- Move text up and down +keymap('n', '', ':m .+1==', opts) +keymap('n', '', ':m .-2==', opts) + +-- Insert -- +-- Press jk fast to exit insert mode +keymap('i', 'jk', '', opts) +keymap('i', 'kj', '', opts) + +-- Visual -- +-- Press jk fast to exit visual mode +keymap('v', 'jk', '', opts) +keymap('v', 'kj', '', opts) + +-- Stay in indent mode +keymap('v', '<', '', '>gv^', opts) + +-- Move text up and down +keymap('v', '', ":m '>+1gv=gv", opts) +keymap('v', '', ":m '<-2gv=gv", opts) +keymap('v', 'p', '"_dP', opts) + +-- Visual Block -- +-- Move text up and down +keymap('x', 'J', ":m '>+1gv=gv", opts) +keymap('x', 'K', ":m '<-2gv=gv", opts) +keymap('x', '', ":m '>+1gv=gv", opts) +keymap('x', '', ":m '<-2gv=gv", opts) + +-- Don't yank when deleting -- +keymap('n', 'd', '"_d', opts) + +-- Quickfix Step File -- +keymap('n', '', ':cnext', opts) +keymap('n', '', ':cprev', opts) + +-- Neorg settings -- +vim.opt.foldmethod = 'indent' +vim.opt.foldlevelstart = 0 +vim.opt.conceallevel = 3 +vim.opt.concealcursor = 'nc' + return {}