diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..6c1a72c --- /dev/null +++ b/config.lua @@ -0,0 +1,8 @@ +-- Read the docs: https://www.lunarvim.org/docs/configuration +-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6 +-- Forum: https://www.reddit.com/r/lunarvim/ +-- Discord: https://discord.com/invite/Xb9B4Ny + +require("plugins") +require("options") +require("maps") diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..2203095 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,45 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" }, + "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" }, + "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, + "bufferline.nvim": { "branch": "main", "commit": "a4bd44523316928a7c4a5c09a3407d02c30b6027" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, + "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "d6a782c7002682f4a01b79fc3918c4584ad6e8fb" }, + "lir.nvim": { "branch": "master", "commit": "1aa871f20637eccc4e1e26b0fbcf9aafc9b6caf7" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, + "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, + "neodev.nvim": { "branch": "main", "commit": "0043cf91c18aeac8db5765eb86c6078e17ac9325" }, + "nlsp-settings.nvim": { "branch": "main", "commit": "32aa12da328258f2dccb15d327c26a8d21d9f4bd" }, + "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, + "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, + "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, + "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, + "nvim-tree.lua": { "branch": "master", "commit": "bb375fb20327c49920c41d2b51c1ce2f4fe7deb3" }, + "nvim-treesitter": { "branch": "master", "commit": "2ce3c9080cfe4a39c7907e672edafd2a95244a7c" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, + "nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" }, + "onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, + "schemastore.nvim": { "branch": "main", "commit": "0b396f538f195c249f021a48c3d8988f0d3f86f7" }, + "structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "9de317bdea2bc393074651179c4fc7f93e9b2d56" }, + "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" }, + "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, + "vim-template": { "branch": "master", "commit": "0bf607233719a0ed6e14bf0197ba8950bf8833fc" }, + "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } +} \ No newline at end of file diff --git a/lua/git.lua b/lua/git.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/maps.lua b/lua/maps.lua new file mode 100644 index 0000000..eff7ae1 --- /dev/null +++ b/lua/maps.lua @@ -0,0 +1,17 @@ +#! /usr/bin/env lua +-- +-- maps.lua +-- Copyright (C) 2023 veypi +-- +-- Distributed under terms of the MIT license. +-- + + +lvim.keys.normal_mode[""] = ":NvimTreeToggle" +lvim.keys.normal_mode["q"] = ":bd" +lvim.keys.normal_mode["Q"] = ":qa!" +-- lvim.keys.normal_mode["<-[>"] = ":BufferLineCyclePrev" + +-- lvim.builtin.which_key.mappings["\["] = ":BufferLineCyclePrev" +-- nmap [ :BufferLineCyclePrev +-- nmap ] :BufferLineCycleNext diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..ccb4e34 --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,56 @@ +lvim.format_on_save.enabled = true + + +vim.g.user = "veypi" +vim.g.email = "i@veypi.com" + +local options = { + fileencoding = "utf-8", -- the encoding written to a file + wrap = false, -- display lines as one long line + + showtabline = 1, -- always show tabs + expandtab = true, -- convert tabs to spaces + tabstop = 4, -- insert 4 spaces for a tab + shiftwidth = 4, -- the number of spaces inserted for each indentation + + cursorline = true, -- highlight the current line + + signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time + + backup = false, -- creates a backup file + clipboard = "unnamedplus", -- allows neovim to access the system clipboard + cmdheight = 1, -- more space in the neovim command line for displaying messages + completeopt = { "menuone", "noselect" }, -- mostly just for cmp + conceallevel = 0, -- so that `` is visible in markdown files + hlsearch = true, -- highlight all matches on previous search pattern + ignorecase = true, -- ignore case in search patterns + mouse = "a", -- allow the mouse to be used in neovim + pumheight = 10, -- pop up menu height + showmode = false, -- we don't need to see things like -- INSERT -- anymore + smartcase = true, -- smart case + smartindent = true, -- make indenting smarter again + splitbelow = true, -- force all horizontal splits to go below current window + splitright = true, -- force all vertical splits to go to the right of current window + swapfile = false, -- creates a swapfile + termguicolors = true, -- set term gui colors (most terminals support this) + timeoutlen = 1000, -- time to wait for a mapped sequence to complete (in milliseconds) + undofile = true, -- enable persistent undo + updatetime = 100, -- faster completion (4000ms default) + writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited + number = true, -- set numbered lines + laststatus = 3, + showcmd = false, + ruler = false, + relativenumber = true, -- set relative numbered lines + numberwidth = 2, -- set number column width to 2 {default 4} + scrolloff = 0, + sidescrolloff = 8, + guifont = "monospace:h17", -- the font used in graphical neovim applications + -- colorcolumn = "80", + -- colorcolumn = "120", +} + +vim.opt.relativenumber = true +for k, v in pairs(options) do + vim.opt[k] = v +end diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..fdd4386 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,8 @@ +lvim.plugins = { + { + 'aperezdc/vim-template', + config = function() + vim.cmd("let g:templates_directory = '~/.config/lvim/templates'") + end, + }, +} diff --git a/snippets/config.lua b/snippets/config.lua new file mode 100644 index 0000000..2bd960b --- /dev/null +++ b/snippets/config.lua @@ -0,0 +1,7 @@ +#! /usr/bin/env lua +-- +-- config.lua +-- Copyright (C) 2023 veypi +-- +-- Distributed under terms of the MIT license. +-- diff --git a/snippets/package.json b/snippets/package.json new file mode 100644 index 0000000..c4dacfb --- /dev/null +++ b/snippets/package.json @@ -0,0 +1,15 @@ +{ + "name": "nvim-snippets", + "author": "veypi", + "engines": { + "vscode": "^1.11.0" + }, + "contributes": { + "snippets": [ + { + "language": "python", + "path": "./python.json" + } + ] + } +} diff --git a/snippets/python.json b/snippets/python.json new file mode 100644 index 0000000..912ab53 --- /dev/null +++ b/snippets/python.json @@ -0,0 +1,9 @@ +{ + "hello": { + "prefix": "hello", + "body": [ + "print('Hello, World!')" + ], + "description": "print Hello, World!" + } +} diff --git a/templates/=template=.go b/templates/=template=.go new file mode 100644 index 0000000..e0f9996 --- /dev/null +++ b/templates/=template=.go @@ -0,0 +1,10 @@ +// +// %FFILE% +// Copyright (C) %YEAR% %USER% <%MAIL%> +// %FDATE% +// Distributed under terms of the %LICENSE% license. +// + +package main + +%HERE% diff --git a/templates/=template=.rs b/templates/=template=.rs new file mode 100644 index 0000000..e782d40 --- /dev/null +++ b/templates/=template=.rs @@ -0,0 +1,8 @@ +// +// %FFILE% +// Copyright (C) %YEAR% %USER% <%MAIL%> +// %FDATE% +// Distributed under terms of the %LICENSE% license. +// + +%HERE% diff --git a/templates/=template=.ts b/templates/=template=.ts new file mode 100644 index 0000000..259568c --- /dev/null +++ b/templates/=template=.ts @@ -0,0 +1,8 @@ +/* + * %FFILE% + * Copyright (C) %YEAR% %USER% <%MAIL%> + * %FDATE% + * Distributed under terms of the %LICENSE% license. + */ + + %HERE% diff --git a/templates/=template=.vue b/templates/=template=.vue new file mode 100644 index 0000000..a6adb7e --- /dev/null +++ b/templates/=template=.vue @@ -0,0 +1,16 @@ + + + + + + + diff --git a/templates/=template=Makefile b/templates/=template=Makefile new file mode 100644 index 0000000..5ffdd47 --- /dev/null +++ b/templates/=template=Makefile @@ -0,0 +1,9 @@ +# +# %FFILE% +# Copyright (C) %YEAR% %USER% <%MAIL%> +# %FDATE% +# Distributed under terms of the %LICENSE% license. +# + +all: + %HERE%@echo "%FFILE% needs your attention"