Move lua files into unique package to prevent clashes

main
Ensar Sarajčić 2022-04-29 13:40:44 +02:00
parent a706fe44a0
commit 2f73d1c533
26 changed files with 35 additions and 35 deletions

View File

@ -1,4 +1,4 @@
require("lsp.jdtls_setup").setup() require("esensar.lsp.jdtls_setup").setup()
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.tabstop = 4 vim.opt.tabstop = 4

View File

@ -1,4 +1,4 @@
if require("init.first_load")() then if require("esensar.init.first_load")() then
return return
end end
@ -15,15 +15,15 @@ vim.api.nvim_exec('let $VIMPLUGINS = expand($VIMHOME."/lua/personal/plugins.lua"
-- Leader config to <Space> -- Leader config to <Space>
vim.g.mapleader = " " vim.g.mapleader = " "
require("init.plugins") require("esensar.init.plugins")
require("init.options") require("esensar.init.options")
require("lsp") require("esensar.lsp")
-- Colorscheme -- Colorscheme
vim.cmd("syntax on") vim.cmd("syntax on")
require("init.colors") require("esensar.init.colors")
vim.keymap.set("n", "Q", "gq", { noremap = false }) vim.keymap.set("n", "Q", "gq", { noremap = false })
vim.keymap.set("i", "<C-U>", "<C-G>u<C-U>") vim.keymap.set("i", "<C-U>", "<C-G>u<C-U>")

View File

@ -3,7 +3,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
local null_ls = require("null-ls") local null_ls = require("null-ls")
local custom_sources = require("lsp.null-ls_sources") local custom_sources = require("esensar.lsp.null-ls_sources")
null_ls.setup({ null_ls.setup({
sources = { sources = {

View File

@ -2,6 +2,6 @@
-- - LSP configuration - -- - LSP configuration -
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
require("lsp.diagnostic") require("esensar.lsp.diagnostic")
require("lsp.servers") require("esensar.lsp.servers")
require("lsp.completion") require("esensar.lsp.completion")

View File

@ -2,7 +2,7 @@
-- - JDTLS server configuration - -- - JDTLS server configuration -
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
local common_config = require("lsp.server_config") local common_config = require("esensar.lsp.server_config")
local M = {} local M = {}
function M.setup() function M.setup()

View File

@ -0,0 +1,9 @@
-- Place for custom null-ls sources
return {
formatters = {
gdformat = require("esensar.lsp.null-ls_sources.gdformat"),
},
diagnostics = {
gdlint = require("esensar.lsp.null-ls_sources.gdlint"),
},
}

View File

@ -3,7 +3,7 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local common_config = require("lsp.server_config") local common_config = require("esensar.lsp.server_config")
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()) local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())

View File

@ -45,14 +45,14 @@ end
function M.open_cached_rest_console(args) function M.open_cached_rest_console(args)
local name = args[0] or args[1] local name = args[0] or args[1]
if not name then if not name then
name = require("common.projects").get_project_id() name = require("esensar.common.projects").get_project_id()
end end
open_cached_rest_console(name) open_cached_rest_console(name)
end end
-- Opens up a rest console which can be saved -- cached by name -- Opens up a rest console which can be saved -- cached by name
function M.open_named_cached_rest_console(name) function M.open_named_cached_rest_console(name)
name = require("common.projects").get_project_id() .. name name = require("esensar.common.projects").get_project_id() .. name
open_cached_rest_console(name) open_cached_rest_console(name)
end end

View File

@ -1,9 +0,0 @@
-- Place for custom null-ls sources
return {
formatters = {
gdformat = require("lsp.null-ls_sources.gdformat"),
},
diagnostics = {
gdlint = require("lsp.null-ls_sources.gdlint"),
},
}

View File

@ -2,15 +2,15 @@
-- - Fugitive.vim setup and extra commands - -- - Fugitive.vim setup and extra commands -
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
vim.cmd([[command! -nargs=0 Ggpush :lua require('fugitive_extensions').push_origin()]]) vim.cmd([[command! -nargs=0 Ggpush :lua require('esensar.fugitive_extensions').push_origin()]])
vim.cmd([[command! -nargs=0 Ggpull :lua require('fugitive_extensions').pull_origin()]]) vim.cmd([[command! -nargs=0 Ggpull :lua require('esensar.fugitive_extensions').pull_origin()]])
vim.cmd([[command! -nargs=? Gpropen :lua require('fugitive_extensions').open_new_pr(<f-args>)]]) vim.cmd([[command! -nargs=? Gpropen :lua require('esensar.fugitive_extensions').open_new_pr(<f-args>)]])
vim.cmd([[command! -nargs=? Gpr Gpropen <args>]]) vim.cmd([[command! -nargs=? Gpr Gpropen <args>]])
vim.cmd([[command! -nargs=? Gprprint :lua require('fugitive_extensions').print_pr_url(<f-args>)]]) vim.cmd([[command! -nargs=? Gprprint :lua require('esensar.fugitive_extensions').print_pr_url(<f-args>)]])
vim.cmd([[command! -nargs=? Gprcopy :lua require('fugitive_extensions').copy_pr_url(<f-args>)]]) vim.cmd([[command! -nargs=? Gprcopy :lua require('esensar.fugitive_extensions').copy_pr_url(<f-args>)]])
vim.cmd([[command! -nargs=1 Gcbranch :lua require('fugitive_extensions').create_branch(<f-args>)]]) vim.cmd([[command! -nargs=1 Gcbranch :lua require('esensar.fugitive_extensions').create_branch(<f-args>)]])
vim.cmd([[command! -nargs=0 Gcmaster :lua require('fugitive_extensions').checkout_branch('main')]]) vim.cmd([[command! -nargs=0 Gcmaster :lua require('esensar.fugitive_extensions').checkout_branch('main')]])
vim.cmd([[command! -nargs=0 Gcm Gcmaster]]) vim.cmd([[command! -nargs=0 Gcm Gcmaster]])
vim.cmd([[command! -nargs=0 Gcdev :lua require('fugitive_extensions').checkout_branch('develop')]]) vim.cmd([[command! -nargs=0 Gcdev :lua require('esensar.fugitive_extensions').checkout_branch('develop')]])
vim.cmd([[command! -nargs=1 Gcheckout :lua require('fugitive_extensions').checkout_branch(<f-args>)]]) vim.cmd([[command! -nargs=1 Gcheckout :lua require('esensar.fugitive_extensions').checkout_branch(<f-args>)]])
vim.cmd([[command! -nargs=1 Gc Gcheckout <args>]]) vim.cmd([[command! -nargs=1 Gc Gcheckout <args>]])

View File

@ -3,5 +3,5 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
vim.api.nvim_create_user_command("EditLocalVimrc", function(_) vim.api.nvim_create_user_command("EditLocalVimrc", function(_)
require("direnv_vimrc_local").open_local_vimrc() require("esensar.direnv_vimrc_local").open_local_vimrc()
end, { nargs = 0 }) end, { nargs = 0 })

View File

@ -2,7 +2,7 @@
-- - Vim REST Console setup and extra commands - -- - Vim REST Console setup and extra commands -
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
local vim_rest_console_extensions = require("vim_rest_console_extensions") local vim_rest_console_extensions = require("esensar.vim_rest_console_extensions")
vim.api.nvim_create_user_command( vim.api.nvim_create_user_command(
"ScratchRestConsole", "ScratchRestConsole",
vim_rest_console_extensions.open_scratch_rest_console, vim_rest_console_extensions.open_scratch_rest_console,

View File

@ -29,4 +29,4 @@ let g:vimwiki_global_ext = 0
let g:vimwiki_listsyms = '✗○◐●✓' let g:vimwiki_listsyms = '✗○◐●✓'
command! -count=0 -nargs=1 VimwikiOpenSubdirectoryIndex :lua require('vimwiki_extensions').open_subdirectory_index_file(<count>, <f-args>) command! -count=0 -nargs=1 VimwikiOpenSubdirectoryIndex :lua require('esensar.vimwiki_extensions').open_subdirectory_index_file(<count>, <f-args>)