summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/core/dashboard.lua7
-rw-r--r--lua/core/galaxyline.lua2
-rw-r--r--lua/core/linter.lua2
-rw-r--r--lua/core/which-key.lua2
-rw-r--r--lua/default-config.lua4
-rw-r--r--lua/lang/java.lua3
-rw-r--r--lua/lang/lua.lua3
-rw-r--r--lua/lv-utils/init.lua12
-rw-r--r--lua/plugin-loader.lua9
9 files changed, 26 insertions, 18 deletions
diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua
index 73f62c25..a1af5319 100644
--- a/lua/core/dashboard.lua
+++ b/lua/core/dashboard.lua
@@ -43,7 +43,8 @@ M.config = function()
},
d = {
description = { " Settings " },
- command = ":e " .. CONFIG_PATH .. "/lv-config.lua",
+ -- command = ":e " .. CONFIG_PATH .. "/lv-config.lua",
+ command = ":e ~/.config/lvim/lv-config.lua",
},
},
@@ -67,8 +68,8 @@ M.setup = function()
-- command = "Telescope find_files cwd=" .. CONFIG_PATH,
-- },
-- e = {description = {'ï‚— Marks '}, command = 'Telescope marks'}
- vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'"
- vim.cmd "let packages = len(globpath('~/.local/share/nvim/site/pack/packer/start', '*', 0, 1))"
+ vim.cmd 'let g:dashboard_session_directory = "~/.config/lvim/.sessions"'
+ vim.cmd "let packages = len(globpath('~/.local/share/lunarvim/site/pack/packer/start', '*', 0, 1))"
vim.api.nvim_exec(
[[
diff --git a/lua/core/galaxyline.lua b/lua/core/galaxyline.lua
index 2cb175f4..f880e430 100644
--- a/lua/core/galaxyline.lua
+++ b/lua/core/galaxyline.lua
@@ -281,7 +281,7 @@ table.insert(gls.right, {
condition = condition.hide_in_width,
separator = " ",
separator_highlight = { "NONE", colors.alt_bg },
- highlight = { colors.alt_bg, colors.alt_bg },
+ highlight = { colors.grey, colors.alt_bg },
},
})
diff --git a/lua/core/linter.lua b/lua/core/linter.lua
index 676b0cf7..573d6d62 100644
--- a/lua/core/linter.lua
+++ b/lua/core/linter.lua
@@ -3,7 +3,7 @@ local M = {}
M.setup = function()
if O.lint_on_save then
require("lv-utils").define_augroups {
- autolint = {
+ autolint_on_save = {
{
"BufWritePost",
"<buffer>",
diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua
index ec64074b..47661df6 100644
--- a/lua/core/which-key.lua
+++ b/lua/core/which-key.lua
@@ -64,7 +64,7 @@ M.config = function()
["w"] = { "<cmd>w!<CR>", "Save" },
["q"] = { "<cmd>q!<CR>", "Quit" },
["/"] = { "<cmd>CommentToggle<CR>", "Comment" },
- ["c"] = { "<cmd>BufferClose<CR>", "Close Buffer" },
+ ["c"] = { "<cmd>BufferClose!<CR>", "Close Buffer" },
["e"] = { "<cmd>lua require'core.nvimtree'.toggle_tree()<CR>", "Explorer" },
["f"] = { "<cmd>Telescope find_files<CR>", "Find File" },
["h"] = { '<cmd>let @/=""<CR>', "No Highlight" },
diff --git a/lua/default-config.lua b/lua/default-config.lua
index e245fe86..2503aaa2 100644
--- a/lua/default-config.lua
+++ b/lua/default-config.lua
@@ -1,4 +1,4 @@
-CONFIG_PATH = vim.fn.stdpath "config"
+CONFIG_PATH = os.getenv "HOME" .. "/.local/share/lunarvim/lvim"
DATA_PATH = vim.fn.stdpath "data"
CACHE_PATH = vim.fn.stdpath "cache"
TERMINAL = vim.fn.expand "$TERMINAL"
@@ -13,7 +13,7 @@ O = {
transparent_window = false,
format_on_save = true,
lint_on_save = true,
- vsnip_dir = vim.fn.stdpath "config" .. "/snippets",
+ vsnip_dir = os.getenv "HOME" .. "/.config/snippets",
default_options = {
backup = false, -- creates a backup file
diff --git a/lua/lang/java.lua b/lua/lang/java.lua
index 73358317..d84c0000 100644
--- a/lua/lang/java.lua
+++ b/lua/lang/java.lua
@@ -58,7 +58,8 @@ M.lsp = function()
else
print "Unsupported system"
end
- JAVA_LS_EXECUTABLE = CONFIG_PATH .. "/utils/bin/jdtls"
+
+ JAVA_LS_EXECUTABLE = os.getenv "HOME" .. "/.local/share/lunarvim/lvim/utils/bin/jdtls"
require("jdtls").start_or_attach {
on_attach = require("lsp").common_on_attach,
diff --git a/lua/lang/lua.lua b/lua/lang/lua.lua
index 415e0849..02b2decf 100644
--- a/lua/lang/lua.lua
+++ b/lua/lang/lua.lua
@@ -59,11 +59,12 @@ M.lsp = function()
},
diagnostics = {
-- Get the language server to recognize the `vim` global
- globals = { "vim" },
+ globals = { "vim", "O" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
+ [vim.fn.expand "~/.local/share/lunarvim/lvim/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
diff --git a/lua/lv-utils/init.lua b/lua/lv-utils/init.lua
index 1776a020..3dff8f2e 100644
--- a/lua/lv-utils/init.lua
+++ b/lua/lv-utils/init.lua
@@ -57,11 +57,13 @@ function lv_utils.generate_settings()
end
function lv_utils.reload_lv_config()
- vim.cmd "source ~/.config/nvim/lua/keymappings.lua"
- vim.cmd "source ~/.config/nvim/lv-config.lua"
- vim.cmd "source ~/.config/nvim/lua/plugins.lua"
- vim.cmd "source ~/.config/nvim/lua/settings.lua"
- vim.cmd "source ~/.config/nvim/lua/core/formatter.lua"
+ vim.cmd "source ~/.config/lvim/lv-config.lua"
+ vim.cmd "source ~/.local/share/lunarvim/lvim/lua/plugins.lua"
+ local plugins = require "plugins"
+ local plugin_loader = require("plugin-loader").init()
+ plugin_loader:load { plugins, O.user_plugins }
+ vim.cmd "source ~/.local/share/lunarvim/lvim/lua/settings.lua"
+ vim.cmd "source ~/.local/share/lunarvim/lvim/lua/core/formatter.lua"
vim.cmd ":PackerCompile"
vim.cmd ":PackerInstall"
-- vim.cmd ":PackerClean"
diff --git a/lua/plugin-loader.lua b/lua/plugin-loader.lua
index 25a41111..b7e68a1e 100644
--- a/lua/plugin-loader.lua
+++ b/lua/plugin-loader.lua
@@ -4,7 +4,7 @@ function plugin_loader:init()
local execute = vim.api.nvim_command
local fn = vim.fn
- local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
+ local install_path = "~/.local/share/lunarvim/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
execute "packadd packer.nvim"
@@ -15,12 +15,15 @@ function plugin_loader:init()
return
end
+ local util = require "packer.util"
+
packer.init {
- -- package_root = require("packer.util").join_paths(vim.fn.stdpath "data", "lvim", "pack"),
+ package_root = util.join_paths "~/.local/share/lunarvim/site/pack/",
+ compile_path = util.join_paths("~/.config/lvim", "plugin", "packer_compiled.lua"),
git = { clone_timeout = 300 },
display = {
open_fn = function()
- return require("packer.util").float { border = "single" }
+ return util.float { border = "single" }
end,
},
}