diff --git a/.bin/.e b/.bin/.e index 08b9ab3..1883938 100755 --- a/.bin/.e +++ b/.bin/.e @@ -4,6 +4,7 @@ declare -A mapper=( [".e"]="$HOME/.bin/.e" [".t"]="$HOME/.bin/.t" ["alacritty"]="$HOME/.config/alacritty/alacritty.toml" + ["astronvim"]="$HOME/.config/astronvim/lua/user/init.lua" ["autoinstall.toml"]="$HOME/.config/autoinstall.toml" ["autostart.toml"]="$HOME/.config/autostart.toml" ["backup"]="$HOME/.bin/host-backup-$(cat /proc/sys/kernel/hostname)" diff --git a/.config/astronvim/lua/user/.luacheckrc b/.config/astronvim/lua/user/.luacheckrc new file mode 100644 index 0000000..d1113eb --- /dev/null +++ b/.config/astronvim/lua/user/.luacheckrc @@ -0,0 +1,18 @@ +-- Global objects +globals = { + "astronvim", + "astronvim_installation", + "vim", + "bit", +} + +-- Rerun tests only if their modification time changed +cache = true + +-- Don't report unused self arguments of methods +self = false + +ignore = { + "631", -- max_line_length + "212/_.*", -- unused argument, for vars with "_" prefix +} diff --git a/.config/astronvim/lua/user/.neoconf.json b/.config/astronvim/lua/user/.neoconf.json new file mode 100644 index 0000000..2d7a81f --- /dev/null +++ b/.config/astronvim/lua/user/.neoconf.json @@ -0,0 +1,20 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + }, + "lspconfig": { + "lua_ls": { + "Lua.format.enable": false + } + } +} diff --git a/.config/astronvim/lua/user/.stylua.toml b/.config/astronvim/lua/user/.stylua.toml new file mode 100644 index 0000000..bfcffff --- /dev/null +++ b/.config/astronvim/lua/user/.stylua.toml @@ -0,0 +1,7 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferDouble" +call_parentheses = "None" +collapse_simple_statement = "Always" diff --git a/.config/astronvim/lua/user/README.md b/.config/astronvim/lua/user/README.md new file mode 100644 index 0000000..e6c589a --- /dev/null +++ b/.config/astronvim/lua/user/README.md @@ -0,0 +1,36 @@ +# AstroNvim User Configuration Example + +A user configuration template for [AstroNvim](https://github.com/AstroNvim/AstroNvim) + +## 🛠️ Installation + +#### Make a backup of your current nvim and shared folder + +```shell +mv ~/.config/nvim ~/.config/nvim.bak +mv ~/.local/share/nvim ~/.local/share/nvim.bak +``` + +#### Clone AstroNvim + +```shell +git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim +``` + +#### Create a new user repository from this template + +Press the "Use this template" button above to create a new repository to store your user configuration. + +You can also just clone this repository directly if you do not want to track your user configuration in GitHub. + +#### Clone the repository + +```shell +git clone https://github.com// ~/.config/nvim/lua/user +``` + +#### Start Neovim + +```shell +nvim +``` diff --git a/.config/astronvim/lua/user/highlights/duskfox.lua b/.config/astronvim/lua/user/highlights/duskfox.lua new file mode 100644 index 0000000..31318ee --- /dev/null +++ b/.config/astronvim/lua/user/highlights/duskfox.lua @@ -0,0 +1,3 @@ +return { -- a table of overrides/changes to the duskfox theme + Normal = { bg = "#000000" }, +} diff --git a/.config/astronvim/lua/user/highlights/init.lua b/.config/astronvim/lua/user/highlights/init.lua new file mode 100644 index 0000000..f7e055b --- /dev/null +++ b/.config/astronvim/lua/user/highlights/init.lua @@ -0,0 +1,3 @@ +return { -- this table overrides highlights in all themes + -- Normal = { bg = "#000000" }, +} diff --git a/.config/astronvim/lua/user/init.lua b/.config/astronvim/lua/user/init.lua new file mode 100644 index 0000000..deba15f --- /dev/null +++ b/.config/astronvim/lua/user/init.lua @@ -0,0 +1,85 @@ +return { + -- Configure AstroNvim updates + updater = { + remote = "origin", -- remote to use + channel = "stable", -- "stable" or "nightly" + version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY) + branch = "nightly", -- branch name (NIGHTLY ONLY) + commit = nil, -- commit hash (NIGHTLY ONLY) + pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only) + skip_prompts = false, -- skip prompts about breaking changes + show_changelog = true, -- show the changelog after performing an update + auto_quit = false, -- automatically quit the current session after a successful update + remotes = { -- easily add new remotes to track + -- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url + -- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut, + -- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork + }, + }, + + -- Set colorscheme to use + colorscheme = "dracula", + + -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on + diagnostics = { + virtual_text = true, + underline = true, + }, + + lsp = { + -- customize lsp formatting options + formatting = { + -- control auto formatting on save + format_on_save = { + enabled = true, -- enable or disable format on save globally + allow_filetypes = { -- enable format on save for specified filetypes only + -- "go", + }, + ignore_filetypes = { -- disable format on save for specified filetypes + -- "python", + }, + }, + disabled = { -- disable formatting capabilities for the listed language servers + -- disable lua_ls formatting capability if you want to use StyLua to format your lua code + -- "lua_ls", + }, + timeout_ms = 1000, -- default format timeout + -- filter = function(client) -- fully override the default formatting function + -- return true + -- end + }, + -- enable servers that you already have installed without mason + servers = { + -- "pyright" + }, + }, + + -- Configure require("lazy").setup() options + lazy = { + defaults = { lazy = true }, + performance = { + rtp = { + -- customize default disabled vim plugins + disabled_plugins = { "tohtml", "gzip", "matchit", "zipPlugin", "netrwPlugin", "tarPlugin" }, + }, + }, + }, + + -- This function is run last and is a good place to configuring + -- augroups/autocommands and custom filetypes also this just pure lua so + -- anything that doesn't fit in the normal config locations above can go here + polish = function() + -- Set up custom filetypes + -- vim.filetype.add { + -- extension = { + -- foo = "fooscript", + -- }, + -- filename = { + -- ["Foofile"] = "fooscript", + -- }, + -- pattern = { + -- ["~/%.config/foo/.*"] = "fooscript", + -- }, + -- } + end, +} diff --git a/.config/astronvim/lua/user/mappings.lua b/.config/astronvim/lua/user/mappings.lua new file mode 100644 index 0000000..8ac5c8f --- /dev/null +++ b/.config/astronvim/lua/user/mappings.lua @@ -0,0 +1,40 @@ +-- Mapping data with "desc" stored directly by vim.keymap.set(). +-- +-- Please use this mappings table to set keyboard mapping since this is the +-- lower level configuration and more robust one. (which-key will +-- automatically pick-up stored data by this setting.) +return { + -- first key is the mode + n = { + -- second key is the lefthand side of the map + + -- navigate buffer tabs with `H` and `L` + -- L = { + -- function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, + -- desc = "Next buffer", + -- }, + -- H = { + -- function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, + -- desc = "Previous buffer", + -- }, + + -- mappings seen under group name "Buffer" + ["bD"] = { + function() + require("astronvim.utils.status").heirline.buffer_picker( + function(bufnr) require("astronvim.utils.buffer").close(bufnr) end + ) + end, + desc = "Pick to close", + }, + -- tables with the `name` key will be registered with which-key if it's installed + -- this is useful for naming menus + ["b"] = { name = "Buffers" }, + -- quick save + -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command + }, + t = { + -- setting a mapping to false will disable it + -- [""] = false, + }, +} diff --git a/.config/astronvim/lua/user/options.lua b/.config/astronvim/lua/user/options.lua new file mode 100644 index 0000000..4116c4e --- /dev/null +++ b/.config/astronvim/lua/user/options.lua @@ -0,0 +1,38 @@ +-- set vim options here (vim.. = value) +return { + opt = { + -- set to true or false etc. + clipboard = "", -- disable direct connection to the system clipboard + relativenumber = true, -- sets vim.opt.relativenumber + number = true, -- sets vim.opt.number + shiftwidth = 2, -- number of space inserted for indentation + spell = false, -- sets vim.opt.spell + signcolumn = "auto", -- sets vim.opt.signcolumn to auto + wrap = false, -- sets vim.opt.wrap + }, + g = { + mapleader = " ", -- sets vim.g.mapleader + autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled) + cmp_enabled = true, -- enable completion at start + autopairs_enabled = true, -- enable autopairs at start + diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on) + icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing) + ui_notifications_enabled = true, -- disable notifications when toggling UI elements + resession_enabled = true, -- enable experimental resession.nvim session management (will be default in AstroNvim v4) + git_worktrees = { + { + toplevel = vim.env.HOME, + gitdir = vim.env.HOME .. "/.local/share/yadm/repo.git" + }, + }, + }, +} +-- If you need more control, you can use the function()...end notation +-- return function(local_vim) +-- local_vim.opt.relativenumber = true +-- local_vim.g.mapleader = " " +-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list +-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list +-- +-- return local_vim +-- end diff --git a/.config/astronvim/lua/user/plugins/community.lua b/.config/astronvim/lua/user/plugins/community.lua new file mode 100644 index 0000000..c4b7976 --- /dev/null +++ b/.config/astronvim/lua/user/plugins/community.lua @@ -0,0 +1,9 @@ +return { + -- Add the community repository of plugin specifications + "AstroNvim/astrocommunity", + -- example of importing a plugin, comment out to use it or add your own + -- available plugins can be found at https://github.com/AstroNvim/astrocommunity + + { import = "astrocommunity.colorscheme.dracula-nvim" }, + -- { import = "astrocommunity.completion.copilot-lua-cmp" }, +} diff --git a/.config/astronvim/lua/user/plugins/core.lua b/.config/astronvim/lua/user/plugins/core.lua new file mode 100644 index 0000000..be1fc3e --- /dev/null +++ b/.config/astronvim/lua/user/plugins/core.lua @@ -0,0 +1,77 @@ +return { + -- customize alpha options + { + "goolord/alpha-nvim", + opts = function(_, opts) + -- customize the dashboard header + opts.section.header.val = { + " █████ ███████ ████████ ██████ ██████", + "██ ██ ██ ██ ██ ██ ██ ██", + "███████ ███████ ██ ██████ ██ ██", + "██ ██ ██ ██ ██ ██ ██ ██", + "██ ██ ███████ ██ ██ ██ ██████", + " ", + " ███  ██ ██  ██ ██ ███  ███", + " ████  ██ ██  ██ ██ ████  ████", + " ██ ██  ██ ██  ██ ██ ██ ████ ██", + " ██  ██ ██  ██  ██  ██ ██  ██  ██", + " ██   ████   ████   ██ ██      ██", + } + return opts + end, + }, + -- You can disable default plugins as follows: + -- { "max397574/better-escape.nvim", enabled = false }, + -- + -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call + -- { + -- "L3MON4D3/LuaSnip", + -- config = function(plugin, opts) + -- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call + -- -- add more custom luasnip configuration such as filetype extend or custom snippets + -- local luasnip = require "luasnip" + -- luasnip.filetype_extend("javascript", { "javascriptreact" }) + -- end, + -- }, + -- { + -- "windwp/nvim-autopairs", + -- config = function(plugin, opts) + -- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call + -- -- add more custom autopairs configuration such as custom rules + -- local npairs = require "nvim-autopairs" + -- local Rule = require "nvim-autopairs.rule" + -- local cond = require "nvim-autopairs.conds" + -- npairs.add_rules( + -- { + -- Rule("$", "$", { "tex", "latex" }) + -- -- don't add a pair if the next character is % + -- :with_pair(cond.not_after_regex "%%") + -- -- don't add a pair if the previous character is xxx + -- :with_pair( + -- cond.not_before_regex("xxx", 3) + -- ) + -- -- don't move right when repeat character + -- :with_move(cond.none()) + -- -- don't delete if the next character is xx + -- :with_del(cond.not_after_regex "xx") + -- -- disable adding a newline when you press + -- :with_cr(cond.none()), + -- }, + -- -- disable for .vim files, but it work for another filetypes + -- Rule("a", "a", "-vim") + -- ) + -- end, + -- }, + -- By adding to the which-key config and using our helper function you can add more which-key registered bindings + -- { + -- "folke/which-key.nvim", + -- config = function(plugin, opts) + -- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call + -- -- Add bindings which show up as group name + -- local wk = require "which-key" + -- wk.register({ + -- b = { name = "Buffer" }, + -- }, { mode = "n", prefix = "" }) + -- end, + -- }, +} diff --git a/.config/astronvim/lua/user/plugins/mason.lua b/.config/astronvim/lua/user/plugins/mason.lua new file mode 100644 index 0000000..6566f34 --- /dev/null +++ b/.config/astronvim/lua/user/plugins/mason.lua @@ -0,0 +1,36 @@ +-- customize mason plugins +return { + -- use mason-lspconfig to configure LSP installations + { + "williamboman/mason-lspconfig.nvim", + -- overrides `require("mason-lspconfig").setup(...)` + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { + -- "lua_ls", + }) + end, + }, + -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources + { + "jay-babu/mason-null-ls.nvim", + -- overrides `require("mason-null-ls").setup(...)` + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { + -- "prettier", + -- "stylua", + }) + end, + }, + { + "jay-babu/mason-nvim-dap.nvim", + -- overrides `require("mason-nvim-dap").setup(...)` + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { + -- "python", + }) + end, + }, +} diff --git a/.config/astronvim/lua/user/plugins/null-ls.lua b/.config/astronvim/lua/user/plugins/null-ls.lua new file mode 100644 index 0000000..beceeda --- /dev/null +++ b/.config/astronvim/lua/user/plugins/null-ls.lua @@ -0,0 +1,17 @@ +return { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, config) + -- config variable is the default configuration table for the setup function call + -- local null_ls = require "null-ls" + + -- Check supported formatters and linters + -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting + -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics + config.sources = { + -- Set a formatter + -- null_ls.builtins.formatting.stylua, + -- null_ls.builtins.formatting.prettier, + } + return config -- return final config table + end, +} diff --git a/.config/astronvim/lua/user/plugins/treesitter.lua b/.config/astronvim/lua/user/plugins/treesitter.lua new file mode 100644 index 0000000..18c6da6 --- /dev/null +++ b/.config/astronvim/lua/user/plugins/treesitter.lua @@ -0,0 +1,9 @@ +return { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { + -- "lua" + }) + end, +} diff --git a/.config/astronvim/lua/user/plugins/user.lua b/.config/astronvim/lua/user/plugins/user.lua new file mode 100644 index 0000000..acdbf63 --- /dev/null +++ b/.config/astronvim/lua/user/plugins/user.lua @@ -0,0 +1,12 @@ +return { + -- You can also add new plugins here as well: + -- Add plugins, the lazy syntax + -- "andweeb/presence.nvim", + -- { + -- "ray-x/lsp_signature.nvim", + -- event = "BufRead", + -- config = function() + -- require("lsp_signature").setup() + -- end, + -- }, +} diff --git a/.config/autoinstall.toml b/.config/autoinstall.toml index a5694a9..245aaec 100644 --- a/.config/autoinstall.toml +++ b/.config/autoinstall.toml @@ -7,9 +7,9 @@ groups = ["base"] [[autoinstall]] type = "git" -source = "https://github.com/wbthomason/packer.nvim" -target = "$HOME/.local/share/nvim/site/pack/packer/start/packer.nvim" -hook = '[ -x "$(command -v nvim)" ] && nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerSync"' +source = "https://github.com/AstroNvim/AstroNvim" +target = "$HOME/.config/nvim" +hook = '[ -x "$(command -v nvim)" ] && nvim --headless +q' groups = ["base"] [[autoinstall]] diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore deleted file mode 100644 index dd23724..0000000 --- a/.config/nvim/.gitignore +++ /dev/null @@ -1 +0,0 @@ -init.lua diff --git a/.config/nvim/after/plugin/colors.lua b/.config/nvim/after/plugin/colors.lua deleted file mode 100644 index a8d3d31..0000000 --- a/.config/nvim/after/plugin/colors.lua +++ /dev/null @@ -1,8 +0,0 @@ -local dracula = require("dracula") -dracula.setup({ - -- show the '~' characters after the end of buffers - show_end_of_buffer = true, -- default false - -- use transparent background - transparent_bg = true, -- default false -}) -vim.cmd('colorscheme dracula') diff --git a/.config/nvim/after/plugin/fugitive.lua b/.config/nvim/after/plugin/fugitive.lua deleted file mode 100644 index 80c9070..0000000 --- a/.config/nvim/after/plugin/fugitive.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "gs", vim.cmd.Git) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua deleted file mode 100644 index a9ef985..0000000 --- a/.config/nvim/after/plugin/lsp.lua +++ /dev/null @@ -1,67 +0,0 @@ -local lsp = require("lsp-zero") - -lsp.preset("recommended") - -lsp.ensure_installed({ - 'bashls', - 'lua_ls', - 'yamlls', -}) - --- Fix Undefined global 'vim' -require('lspconfig').lua_ls.setup({ - settings = { - Lua = { - diagnostics = { - globals = { 'vim' } - } - } - } -}) - -local cmp = require('cmp') -local cmp_select = { behavior = cmp.SelectBehavior.Select } -local cmp_mappings = lsp.defaults.cmp_mappings({ - [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.complete(), -}) - -cmp_mappings[''] = nil -cmp_mappings[''] = nil - -lsp.setup_nvim_cmp({ - mapping = cmp_mappings -}) - -lsp.set_preferences({ - suggest_lsp_servers = false, - sign_icons = { - error = 'E', - warn = 'W', - hint = 'H', - info = 'I' - } -}) - -lsp.on_attach(function(client, bufnr) - local opts = { buffer = bufnr, remap = false } - - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) - vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts) - vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) -end) - -lsp.setup() - -vim.diagnostic.config({ - virtual_text = true -}) diff --git a/.config/nvim/after/plugin/lualine.lua b/.config/nvim/after/plugin/lualine.lua deleted file mode 100644 index be570f1..0000000 --- a/.config/nvim/after/plugin/lualine.lua +++ /dev/null @@ -1,41 +0,0 @@ -local function window() - return vim.api.nvim_win_get_number(0) -end - -require('lualine').setup({ - options = { - icons_enabled = true, - theme = 'dracula', - }, - sections = { - lualine_a = { 'mode' }, - lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { { - 'filename', - path = 1, - } }, - lualine_x = { 'encoding', '%<0x%B', 'filesize', 'fileformat' }, - lualine_y = { 'filetype' }, - lualine_z = { 'location', window } - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { 'filename' }, - lualine_x = { 'location', window }, - lualine_y = {}, - lualine_z = {} - }, - tabline = { - lualine_a = { { - 'tabs', - max_length = vim.o.columns / 2, - mode = 2 - } }, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = { 'branch' }, - lualine_z = {} - } -}) diff --git a/.config/nvim/after/plugin/swap.lua b/.config/nvim/after/plugin/swap.lua deleted file mode 100644 index 621d915..0000000 --- a/.config/nvim/after/plugin/swap.lua +++ /dev/null @@ -1,6 +0,0 @@ -local swap = require('sibling-swap') -swap.setup({ - use_default_keymaps = true -}) -vim.keymap.set('n', 'g<', swap.swap_with_left, {}) -vim.keymap.set('n', 'g>', swap.swap_with_right, {}) diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua deleted file mode 100644 index 67b9635..0000000 --- a/.config/nvim/after/plugin/telescope.lua +++ /dev/null @@ -1,7 +0,0 @@ -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'pf', builtin.find_files, {}) -vim.keymap.set('n', 'pg', builtin.git_files, {}) -vim.keymap.set('n', 'ps', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }) -end) -vim.keymap.set('n', 'vh', builtin.help_tags, {}) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua deleted file mode 100644 index c8766c1..0000000 --- a/.config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,21 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "pkl", "query", "vim", "vimdoc" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/after/plugin/undotree.lua b/.config/nvim/after/plugin/undotree.lua deleted file mode 100644 index b6b9276..0000000 --- a/.config/nvim/after/plugin/undotree.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua deleted file mode 100644 index d2cb9c2..0000000 --- a/.config/nvim/lua/plugins.lua +++ /dev/null @@ -1,67 +0,0 @@ --- This file can be loaded by calling `lua require('plugins')` from your init.vim - --- Only required if you have packer configured as `opt` -vim.cmd [[packadd packer.nvim]] - -return require('packer').startup(function(use) - -- Packer can manage itself - use('wbthomason/packer.nvim') - - use({ - 'nvim-telescope/telescope.nvim', - tag = '0.1.0', - requires = { { 'nvim-lua/plenary.nvim' } } - }) - - use({ - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate' - }) - use("apple/pkl-neovim") - - use("github/copilot.vim") - use("mbbill/undotree") - use("Wansmer/sibling-swap.nvim") - - use({ - 'VonHeikemen/lsp-zero.nvim', - branch = 'v1.x', - requires = { - -- LSP Support - { 'neovim/nvim-lspconfig' }, - { 'williamboman/mason.nvim' }, - { 'williamboman/mason-lspconfig.nvim' }, - - -- Autocompletion - { 'hrsh7th/nvim-cmp' }, - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-path' }, - { 'saadparwaiz1/cmp_luasnip' }, - { 'hrsh7th/cmp-nvim-lsp' }, - { 'hrsh7th/cmp-nvim-lua' }, - - -- Snippets - { 'L3MON4D3/LuaSnip' }, - { 'rafamadriz/friendly-snippets' }, - } - }) - - use({ - 'lewis6991/gitsigns.nvim', - config = function() - require('gitsigns').setup() - end - }) - - use({ - 'nvim-lualine/lualine.nvim', - requires = { 'nvim-tree/nvim-web-devicons', opt = true } - }) - - use('Mofiqul/dracula.nvim') - - local wakatime_api_key = os.getenv("WAKATIME_API_KEY") - if wakatime_api_key then - use('wakatime/vim-wakatime') - end -end) diff --git a/.config/nvim/lua/remap.lua b/.config/nvim/lua/remap.lua deleted file mode 100644 index 15c67c5..0000000 --- a/.config/nvim/lua/remap.lua +++ /dev/null @@ -1,26 +0,0 @@ -vim.g.mapleader = " " - -vim.keymap.set("n", "pv", vim.cmd.Ex) - -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") - --- keep cursor centered in screen -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "n", "nzzzv") -vim.keymap.set("n", "N", "Nzzzv") - --- paste, but don't overwrite buffer -vim.keymap.set("x", "p", "\"_dP") - -vim.keymap.set("n", "", "noh") - -vim.keymap.set("n", "f", vim.lsp.buf.format) - -vim.keymap.set("n", "", "cnextzz") -vim.keymap.set("n", "", "cprevzz") -vim.keymap.set("n", "k", "lnextzz") -vim.keymap.set("n", "j", "lprevzz") - -vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) diff --git a/.config/nvim/lua/set.lua b/.config/nvim/lua/set.lua deleted file mode 100644 index 0d49b49..0000000 --- a/.config/nvim/lua/set.lua +++ /dev/null @@ -1,47 +0,0 @@ -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 = false - -vim.opt.splitbelow = true -vim.opt.splitright = true - -vim.opt.smartindent = true - -vim.opt.wrap = false - -vim.opt.swapfile = false -vim.opt.backup = false -vim.opt.undodir = os.getenv("HOME") .. "/.cache/vim/undo" -vim.opt.undofile = true - -vim.opt.hlsearch = true -vim.opt.incsearch = true -vim.opt.wildmode = "longest,list,full" - -vim.opt.termguicolors = true - -vim.opt.scrolloff = 8 -vim.opt.signcolumn = "yes" -vim.opt.isfname:append("@-@") - -vim.opt.updatetime = 50 - -vim.opt.colorcolumn = "80" - -vim.opt.foldenable = false - - -vim.api.nvim_create_autocmd('TextYankPost', { - group = vim.api.nvim_create_augroup('highlight_yank', {}), - desc = 'Hightlight selection on yank', - pattern = '*', - callback = function() - vim.highlight.on_yank { higroup = 'IncSearch', timeout = 250 } - end, -}) diff --git a/.config/nvim/lua/utils.lua b/.config/nvim/lua/utils.lua deleted file mode 100644 index d03d2be..0000000 --- a/.config/nvim/lua/utils.lua +++ /dev/null @@ -1,21 +0,0 @@ --- Check file extension and set syntax highlighting -vim.cmd([[ - augroup Jinja2Syntax - autocmd! - autocmd BufNewFile,BufRead *.j2 lua require('utils').set_jinja2_syntax() - augroup END -]]) - --- Function to determine Jinja2 syntax highlighting -local function set_jinja2_syntax() - local file_extension = vim.fn.expand("%:e") - if file_extension == "j2" then - local base_filename = vim.fn.expand("%:r") - local base_filetype = vim.fn.fnamemodify(base_filename, ":t") - vim.opt.syntax = base_filetype - end -end - -return { - set_jinja2_syntax = set_jinja2_syntax -} diff --git a/.config/nvim/plugin/.gitignore b/.config/nvim/plugin/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/.config/nvim/plugin/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore