diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-02-13 17:50:25 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-02-13 17:50:25 -0500 |
commit | 013dfcae215ae20fe30654247a91a026118deba4 (patch) | |
tree | 6a4106bd120881c9778ba089e4a75b0f56a4af45 /lua |
laptop config
Diffstat (limited to 'lua')
-rw-r--r-- | lua/cshift/autocolor.lua | 11 | ||||
-rw-r--r-- | lua/cshift/init.lua | 6 | ||||
-rw-r--r-- | lua/cshift/lazy.lua | 15 | ||||
-rw-r--r-- | lua/cshift/opt.lua | 7 | ||||
-rw-r--r-- | lua/cshift/plugins/cmp.lua | 26 | ||||
-rw-r--r-- | lua/cshift/plugins/init.lua | 9 | ||||
-rw-r--r-- | lua/cshift/plugins/lsp.lua | 24 | ||||
-rw-r--r-- | lua/cshift/remaps.lua | 26 |
8 files changed, 124 insertions, 0 deletions
diff --git a/lua/cshift/autocolor.lua b/lua/cshift/autocolor.lua new file mode 100644 index 0000000..10155d2 --- /dev/null +++ b/lua/cshift/autocolor.lua @@ -0,0 +1,11 @@ +local autocolors = vim.api.nvim_create_augroup("AutoColors", {clear = true}) + +vim.api.nvim_create_autocmd("ColorScheme", { + pattern = "*", + callback = function() + vim.cmd("highlight Normal ctermbg=none") + vim.cmd("highlight EndOfBuffer ctermbg=none") + vim.cmd("highlight NonText ctermbg=none") + end, + group = autocolors +}) diff --git a/lua/cshift/init.lua b/lua/cshift/init.lua new file mode 100644 index 0000000..11941b5 --- /dev/null +++ b/lua/cshift/init.lua @@ -0,0 +1,6 @@ +vim.g.mapleader = "s" +require("cshift.autocolor") +require("cshift.lazy") +require("lazy").setup("cshift.plugins") +require("cshift.remaps") +require("cshift.opt") diff --git a/lua/cshift/lazy.lua b/lua/cshift/lazy.lua new file mode 100644 index 0000000..c20194e --- /dev/null +++ b/lua/cshift/lazy.lua @@ -0,0 +1,15 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end + +vim.opt.rtp:prepend(lazypath) + diff --git a/lua/cshift/opt.lua b/lua/cshift/opt.lua new file mode 100644 index 0000000..880bbc4 --- /dev/null +++ b/lua/cshift/opt.lua @@ -0,0 +1,7 @@ +vim.opt.number = true +vim.opt.relativenumber = true + +vim.opt.shiftwidth = 4 +vim.opt.tabstop = 4 + +vim.cmd.colorscheme("slate") diff --git a/lua/cshift/plugins/cmp.lua b/lua/cshift/plugins/cmp.lua new file mode 100644 index 0000000..a1e80b4 --- /dev/null +++ b/lua/cshift/plugins/cmp.lua @@ -0,0 +1,26 @@ +return { + "hrsh7th/nvim-cmp", + dependencies = { + "neovim/nvim-lspconfig", + "hrsh7th/cmp-nvim-lsp", + }, + + config = function() + local cmp = require("cmp") + cmp.setup({ + snippit = { + expand = function(args) + end + }, + + window = { + }, + + sources = cmp.config.sources({ + {name = "nvim_lsp"} + }, { + {name = "buffer"} + }) + }) + end +} diff --git a/lua/cshift/plugins/init.lua b/lua/cshift/plugins/init.lua new file mode 100644 index 0000000..10f36f2 --- /dev/null +++ b/lua/cshift/plugins/init.lua @@ -0,0 +1,9 @@ +return { + { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, +} + diff --git a/lua/cshift/plugins/lsp.lua b/lua/cshift/plugins/lsp.lua new file mode 100644 index 0000000..ebaeab1 --- /dev/null +++ b/lua/cshift/plugins/lsp.lua @@ -0,0 +1,24 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + }, + + config = function() + require("mason").setup() + require("mason-lspconfig").setup({ + ensure_installed = { + "lua_ls", + "clangd" + }, + + handlers = { + function(server_name) + require("lspconfig")[server_name].setup({}) + end + } + }) + + end +} diff --git a/lua/cshift/remaps.lua b/lua/cshift/remaps.lua new file mode 100644 index 0000000..bfc25b2 --- /dev/null +++ b/lua/cshift/remaps.lua @@ -0,0 +1,26 @@ +-- General + +vim.keymap.set('n', '<leader>f', vim.cmd.Explore) + + +-- Project (s)cope + +vim.keymap.set('n', '<leader>sf', function() + require("telescope.builtin").find_files() +end) + + +-- (P)lugins + +vim.keymap.set('n', '<leader>ps', function() + require("lazy").sync() +end) + +vim.keymap.set('n', '<leader>pu', function() + require("lazy").update() +end) + +vim.keymap.set('n', '<leader>ph', function() + require("lazy").health() +end) + |