mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-23 12:16:28 +02:00
Support different config paths (#426)
This makes the configuration files work if neovim's config path is different from `~/.config/nvim`.
This commit is contained in:
parent
046d3e79a9
commit
74ffae99d4
7 changed files with 12 additions and 11 deletions
4
init.lua
4
init.lua
|
@ -1,5 +1,5 @@
|
||||||
require('lv-globals')
|
require('lv-globals')
|
||||||
vim.cmd('luafile ~/.config/nvim/lv-settings.lua')
|
vim.cmd('luafile '..CONFIG_PATH..'/lv-settings.lua')
|
||||||
require('settings')
|
require('settings')
|
||||||
require('plugins')
|
require('plugins')
|
||||||
require('lv-utils')
|
require('lv-utils')
|
||||||
|
@ -20,7 +20,7 @@ require('lv-rnvimr')
|
||||||
require('lv-which-key')
|
require('lv-which-key')
|
||||||
|
|
||||||
-- TODO is there a way to do this without vimscript
|
-- TODO is there a way to do this without vimscript
|
||||||
vim.cmd('source ~/.config/nvim/vimscript/functions.vim')
|
vim.cmd('source '..CONFIG_PATH..'/vimscript/functions.vim')
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
require('lsp')
|
require('lsp')
|
||||||
|
|
|
@ -15,7 +15,7 @@ end
|
||||||
|
|
||||||
local bundles = {
|
local bundles = {
|
||||||
vim.fn.glob(
|
vim.fn.glob(
|
||||||
"~/.config/nvim/.debuggers/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar")
|
CONFIG_PATH.."/.debuggers/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-*.jar")
|
||||||
};
|
};
|
||||||
|
|
||||||
local on_attach = function(client, bufr)
|
local on_attach = function(client, bufr)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- If you are using rvm, make sure to change below configuration
|
-- If you are using rvm, make sure to change below configuration
|
||||||
require'lspconfig'.solargraph.setup {
|
require'lspconfig'.solargraph.setup {
|
||||||
cmd = { DATA_PATH .. "~/.rbenv/shims/solargraph", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "--stdio" },
|
||||||
on_attach = require'lsp'.common_on_attach,
|
on_attach = require'lsp'.common_on_attach,
|
||||||
handlers = {
|
handlers = {
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
|
|
@ -40,7 +40,7 @@ utils.define_augroups({
|
||||||
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
|
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
|
||||||
},
|
},
|
||||||
_java = {
|
_java = {
|
||||||
{'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
|
{'FileType', 'java', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},
|
||||||
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}
|
||||||
},
|
},
|
||||||
_go = {
|
_go = {
|
||||||
|
|
|
@ -26,7 +26,7 @@ vim.g.dashboard_custom_section = {
|
||||||
b = {description = {' Recently Used Files'}, command = 'Telescope oldfiles'},
|
b = {description = {' Recently Used Files'}, command = 'Telescope oldfiles'},
|
||||||
c = {description = {' Load Last Session '}, command = 'SessionLoad'},
|
c = {description = {' Load Last Session '}, command = 'SessionLoad'},
|
||||||
d = {description = {' Find Word '}, command = 'Telescope live_grep'},
|
d = {description = {' Find Word '}, command = 'Telescope live_grep'},
|
||||||
e = {description = {' Settings '}, command = ':e ~/.config/nvim/lv-settings.lua'}
|
e = {description = {' Settings '}, command = ':e '..CONFIG_PATH..'/lv-settings.lua'}
|
||||||
-- e = {description = {' Marks '}, command = 'Telescope marks'}
|
-- e = {description = {' Marks '}, command = 'Telescope marks'}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,5 +41,5 @@ vim.g.dashboard_custom_section = {
|
||||||
-- }
|
-- }
|
||||||
-- find_history = 'SPC f h',
|
-- find_history = 'SPC f h',
|
||||||
|
|
||||||
-- vim.g.dashboard_session_directory = '~/.cache/nvim/session'
|
-- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
|
||||||
vim.g.dashboard_custom_footer = O.dashboard.footer
|
vim.g.dashboard_custom_footer = O.dashboard.footer
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
CONFIG_PATH = vim.fn.stdpath('config')
|
||||||
|
DATA_PATH = vim.fn.stdpath('data')
|
||||||
|
CACHE_PATH = vim.fn.stdpath('cache')
|
||||||
|
|
||||||
O = {
|
O = {
|
||||||
auto_close_tree = 0,
|
auto_close_tree = 0,
|
||||||
auto_complete = true,
|
auto_complete = true,
|
||||||
|
@ -81,6 +85,3 @@ O = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DATA_PATH = vim.fn.stdpath('data')
|
|
||||||
CACHE_PATH = vim.fn.stdpath('cache')
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
" packadd quickscope
|
" packadd quickscope
|
||||||
|
|
||||||
luafile ~/.config/nvim/lua/settings.lua
|
execute 'luafile ' . stdpath('config') . '/lua/settings.lua'
|
||||||
|
|
||||||
function! s:manageEditorSize(...)
|
function! s:manageEditorSize(...)
|
||||||
let count = a:1
|
let count = a:1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue