aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/lua/custom/chadrc.lua15
-rw-r--r--.config/nvim/lua/custom/init.lua36
-rw-r--r--.config/nvim/lua/custom/plugins/init.lua42
3 files changed, 66 insertions, 27 deletions
diff --git a/.config/nvim/lua/custom/chadrc.lua b/.config/nvim/lua/custom/chadrc.lua
index 3880b87..a5de99c 100644
--- a/.config/nvim/lua/custom/chadrc.lua
+++ b/.config/nvim/lua/custom/chadrc.lua
@@ -1,5 +1,6 @@
-- 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 = {}, {}, {}, {}
@@ -12,19 +13,21 @@ local M = {}
-- examples of setting relative number & changing theme:
M.options = {
- relativenumber = true,
- expandtab = false,
- smartindent = false,
- tabstop = 4,
+ relativenumber = true,
+ expandtab = false,
+ shiftwidth = 4,
+ smartindent = false,
+ tabstop = 4,
}
M.ui = {
- theme = "chadracula",
- transparency = true,
+ 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
diff --git a/.config/nvim/lua/custom/init.lua b/.config/nvim/lua/custom/init.lua
index fdc222b..2f15913 100644
--- a/.config/nvim/lua/custom/init.lua
+++ b/.config/nvim/lua/custom/init.lua
@@ -1,7 +1,7 @@
-- This is where your custom modules and plugins go.
-- See the wiki for a guide on how to extend NvChad
-local hooks = require "core.hooks"
-vim.g.did_load_filetypes = 1
+--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")
@@ -18,7 +18,7 @@ vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv")
-- 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
--- hooks.override("lsp", "publish_diagnostics", function(current)
+-- customPlugins.override("lsp", "publish_diagnostics", function(current)
-- current.virtual_text = false;
-- return current;
-- end)
@@ -27,7 +27,7 @@ vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv")
-- you can set one or many mappings
-- example below:
--- hooks.add("setup_mappings", function(map)
+-- customPlugins.add("setup_mappings", function(map)
-- map("n", "<leader>cc", "gg0vG$d", opt) -- example to delete the buffer
-- .... many more mappings ....
-- end)
@@ -37,7 +37,8 @@ vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv")
-- see: https://github.com/wbthomason/packer.nvim
-- examples below:
-hooks.add("install_plugins", function(use)
+--[[
+customPlugins.add("install_plugins", function(use)
use {
"williamboman/nvim-lsp-installer",
config = function()
@@ -57,21 +58,14 @@ hooks.add("install_plugins", function(use)
server:setup(opts)
vim.cmd [[ do User LspAttachBuffers ]]
- end)
- end,
- }
- use {
- "jose-elias-alvarez/null-ls.nvim",
- after = "nvim-lspconfig",
- config = function()
- local null_ls = require("null-ls")
- null_ls.setup({
- sources = {
- null_ls.builtins.formatting.deno_fmt
- }
- })
- end,
- }
+-- end)
+-- end,
+-- }
+ --]]
+ -- Custom stuff
+ -- use { "nathom/filetype.nvim" }
+ --[[
+
-- use { "umaumax/vim-lcov" }
@@ -100,7 +94,7 @@ hooks.add("install_plugins", function(use)
"editorconfig/editorconfig-vim",
}
end)
-
+--]]
-- alternatively, put this in a sub-folder like "lua/custom/plugins/mkdir"
-- then source it with
diff --git a/.config/nvim/lua/custom/plugins/init.lua b/.config/nvim/lua/custom/plugins/init.lua
new file mode 100644
index 0000000..5b40def
--- /dev/null
+++ b/.config/nvim/lua/custom/plugins/init.lua
@@ -0,0 +1,42 @@
+ 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",
+ }
+
+}