diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-05-16 16:56:37 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2022-05-16 16:56:37 +0000 |
commit | 208ca50d939785d0838d5b76d0fd542d2833c41f (patch) | |
tree | c59cb67ed76113865efe8c2790e30b52ca0916d7 /.config/nvim/lua | |
parent | 89e17f068f5ddb6616ddd42841913a630876fe13 (diff) | |
download | dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar.gz dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar.bz2 dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar.lz dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar.xz dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.tar.zst dotfiles-208ca50d939785d0838d5b76d0fd542d2833c41f.zip |
Custom neovim config
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/custom/chadrc.lua | 46 | ||||
-rw-r--r-- | .config/nvim/lua/custom/init.lua | 101 | ||||
-rw-r--r-- | .config/nvim/lua/custom/plugins/init.lua | 42 |
3 files changed, 0 insertions, 189 deletions
diff --git a/.config/nvim/lua/custom/chadrc.lua b/.config/nvim/lua/custom/chadrc.lua deleted file mode 100644 index a5de99c..0000000 --- a/.config/nvim/lua/custom/chadrc.lua +++ /dev/null @@ -1,46 +0,0 @@ --- IMPORTANT NOTE : This is the user config, can be edited. Will be preserved if updated with internal updater --- This file is for NvChad options & tools, custom settings are split between here and 'lua/custom/init.lua' -local userPlugins = require "custom.plugins" - -local M = {} --- M.options, M.ui, M.mappings, M.plugins = {}, {}, {}, {} - --- NOTE: To use this, make a copy with `cp example_chadrc.lua chadrc.lua` - --------------------------------------------------------------------- - --- To use this file, copy the structure of `core/default_config.lua`, --- examples of setting relative number & changing theme: - -M.options = { - relativenumber = true, - expandtab = false, - shiftwidth = 4, - smartindent = false, - tabstop = 4, -} - -M.ui = { - theme = "chadracula", - transparency = true, -} - --- NvChad included plugin options & overrides -M.plugins = { - install = userPlugins, - options = { - -- lspconfig = { - -- path of file containing setups of different lsps (ex : "custom.plugins.lspconfig"), read the docs for more info - -- setup_lspconf = "", - -- }, - }, - -- To change the Packer `config` of a plugin that comes with NvChad, - -- add a table entry below matching the plugin github name - -- '-' -> '_', remove any '.lua', '.nvim' extensions - -- this string will be called in a `require` - -- use "(custom.configs).my_func()" to call a function - -- use "custom.blankline" to call a file - default_plugin_config_replace = {}, -} - -return M diff --git a/.config/nvim/lua/custom/init.lua b/.config/nvim/lua/custom/init.lua deleted file mode 100644 index 2f15913..0000000 --- a/.config/nvim/lua/custom/init.lua +++ /dev/null @@ -1,101 +0,0 @@ --- This is where your custom modules and plugins go. --- See the wiki for a guide on how to extend NvChad ---local customPlugins = require "core.customPlugins" - -vim.api.nvim_command("nnoremap <A-j> :m .+1<CR>==") -vim.api.nvim_command("nnoremap <A-k> :m .-2<CR>==") -vim.api.nvim_command("inoremap <A-j> <Esc>:m .+1<CR>==gi") -vim.api.nvim_command("inoremap <A-k> <Esc>:m .-2<CR>==gi") -vim.api.nvim_command("vnoremap <A-j> :m '>+1<CR>gv=gv") -vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv") - --- NOTE: To use this, make a copy with `cp example_init.lua init.lua` - --------------------------------------------------------------------- - --- To modify packaged plugin configs, use the overrides functionality --- if the override does not exist in the plugin config, make or request a PR, --- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{} --- this will run your config instead of the NvChad config for the given plugin - --- customPlugins.override("lsp", "publish_diagnostics", function(current) --- current.virtual_text = false; --- return current; --- end) - --- To add new mappings, use the "setup_mappings" hook, --- you can set one or many mappings --- example below: - --- customPlugins.add("setup_mappings", function(map) --- map("n", "<leader>cc", "gg0vG$d", opt) -- example to delete the buffer --- .... many more mappings .... --- end) - --- To add new plugins, use the "install_plugin" hook, --- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) --- see: https://github.com/wbthomason/packer.nvim --- examples below: - ---[[ -customPlugins.add("install_plugins", function(use) - use { - "williamboman/nvim-lsp-installer", - config = function() - local lsp_installer = require "nvim-lsp-installer" - - lsp_installer.on_server_ready(function(server) - local opts = {} - - if server.name == "denols" then - opts.root_dir = vim.loop.cwd - opts.init_options = { - enable = true, - lint = true, - unstable = true, - } - end - - server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] --- end) --- end, --- } - --]] - -- Custom stuff - -- use { "nathom/filetype.nvim" } - --[[ - - - -- use { "umaumax/vim-lcov" } - - use { "google/vim-maktaba" } - use { "google/vim-coverage" } - - use { "nathom/filetype.nvim" } - - use { - "karb94/neoscroll.nvim", - opt = true, - config = function() - require("neoscroll").setup() - end, - - -- lazy loading - setup = function() - require("core.utils").packer_lazy_load "neoscroll.nvim" - end, - } - - use { - "prettier/vim-prettier", - } - use { - "editorconfig/editorconfig-vim", - } -end) ---]] --- alternatively, put this in a sub-folder like "lua/custom/plugins/mkdir" --- then source it with - --- require "custom.plugins.mkdir" diff --git a/.config/nvim/lua/custom/plugins/init.lua b/.config/nvim/lua/custom/plugins/init.lua deleted file mode 100644 index 5b40def..0000000 --- a/.config/nvim/lua/custom/plugins/init.lua +++ /dev/null @@ -1,42 +0,0 @@ - return { -{ - "williamboman/nvim-lsp-installer", - config = function() - local lsp_installer = require "nvim-lsp-installer" - - lsp_installer.on_server_ready(function(server) - local opts = {} - - if server.name == "denols" then - opts.root_dir = vim.loop.cwd - end - - server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] - end) - end, - } - -- Custom stuff - ,{ "nathom/filetype.nvim" } - - ,{ - "karb94/neoscroll.nvim", - opt = true, - config = function() - require("neoscroll").setup() - end, - - -- lazy loading - setup = function() - require("core.utils").packer_lazy_load "neoscroll.nvim" - end, - } - - ,{ - "prettier/vim-prettier", - } - ,{ - "editorconfig/editorconfig-vim", - } - -} |