commit f737861e81541c6adab3799783afea40d6cf4d8e Author: Adithya Nair Date: Sat Feb 10 22:51:14 2024 +0530 start vim from scratch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c84aa4a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +plugin/packer_compiled.lua diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/after/plugin/colors.lua b/after/plugin/colors.lua new file mode 100644 index 0000000..32f2f9b --- /dev/null +++ b/after/plugin/colors.lua @@ -0,0 +1 @@ +vim.cmd[[colorscheme dracula]] diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua new file mode 100644 index 0000000..49e3140 --- /dev/null +++ b/after/plugin/telescope.lua @@ -0,0 +1,4 @@ +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fp', builtin.git_files, {}) +vim.keymap.set('n', 'gf', builtin.live_grep, {}) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua new file mode 100644 index 0000000..75b8af7 --- /dev/null +++ b/after/plugin/treesitter.lua @@ -0,0 +1,33 @@ +require'nvim-treesitter.configs'.setup { + + ensure_installed = { + "bash", + "diff", + "dockerfile", + "git_config", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + "go", + "gomod", + "gosum", + "json", + "markdown", + "markdown_inline", + "nix", + "lua", + "toml", + "vim", + "vimdoc", + -- "yaml" Not compiling for some reason? + }, + + sync_install = false, + auto_install = true, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +} diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..e747cb3 --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +require('plugins') +require('remap') +require('options') + diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..2dac2c4 --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,20 @@ +vim.opt.autowrite = true +vim.opt.background = "dark" +vim.opt.expandtab = true +vim.opt.laststatus = 2 +vim.opt.list = true +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.scrolloff = 10 +vim.opt.shiftwidth = 2 +vim.opt.showmode = false +vim.opt.signcolumn = "yes" +vim.opt.smartindent = true +vim.opt.softtabstop = 2 +vim.opt.splitbelow = true +vim.opt.splitright = true +vim.opt.swapfile = false +vim.opt.tabstop = 2 +vim.opt.termguicolors = true +vim.opt.updatetime = 100 +vim.opt.wrap = false diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..3b1a4d2 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,10 @@ +return require('packer').startup(function(use) + use 'wbthomason/packer.nvim' + + use 'Mofiqul/dracula.nvim' + + use { 'nvim-telescope/telescope.nvim', tag = '0.1.5', requires = { {'nvim-lua/plenary.nvim'} } } + + use { 'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' } } + +end) diff --git a/lua/remap.lua b/lua/remap.lua new file mode 100644 index 0000000..c484daf --- /dev/null +++ b/lua/remap.lua @@ -0,0 +1,3 @@ +vim.keymap.set("n", "", vim.cmd.bprevious) +vim.keymap.set("n", "", vim.cmd.bNext) +vim.keymap.set("n", "", vim.cmd.nohlsearch)