start formatting rules

This commit is contained in:
Rafael 2021-07-04 22:14:01 -03:00
parent b461c878e6
commit 9f511bcb59
No known key found for this signature in database
GPG key ID: F5302DA7C6F2F5FD
65 changed files with 2829 additions and 2812 deletions

View file

@ -1,4 +1,4 @@
vim.cmd([[
vim.cmd [[
au BufRead,BufNewFile *.zig set filetype=zig
au BufRead,BufNewFile *.zir set filetype=zir
]])
]]

View file

@ -1,31 +1,31 @@
local clangd_flags = {"--background-index"};
local clangd_flags = { "--background-index" }
if O.lang.clang.cross_file_rename then
table.insert(clangd_flags, "--cross-file-rename")
table.insert(clangd_flags, "--cross-file-rename")
end
table.insert(clangd_flags, "--header-insertion=" .. O.lang.clang.header_insertion)
require'lspconfig'.clangd.setup {
cmd = {DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd", unpack(clangd_flags)},
on_attach = require'lsp'.common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.clang.diagnostics.virtual_text,
signs = O.lang.clang.diagnostics.signs,
underline = O.lang.clang.diagnostics.underline,
update_in_insert = true
})
}
require("lspconfig").clangd.setup {
cmd = { DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd", unpack(clangd_flags) },
on_attach = require("lsp").common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.clang.diagnostics.virtual_text,
signs = O.lang.clang.diagnostics.signs,
underline = O.lang.clang.diagnostics.underline,
update_in_insert = true,
}),
},
}
if O.lang.clang.autoformat then
require('lv-utils').define_augroups({
_clang_autoformat = {
{'BufWritePre *.c lua vim.lsp.buf.formatting_sync(nil,1000)'},
{'BufWritePre *.h lua vim.lsp.buf.formatting_sync(nil,1000)'},
{'BufWritePre *.cpp lua vim.lsp.buf.formatting_sync(nil,1000)'},
{'BufWritePre *.hpp lua vim.lsp.buf.formatting_sync(nil,1000)'},
}})
require("lv-utils").define_augroups {
_clang_autoformat = {
{ "BufWritePre *.c lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.h lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.cpp lua vim.lsp.buf.formatting_sync(nil,1000)" },
{ "BufWritePre *.hpp lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -1,5 +1,5 @@
require'lspconfig'.cmake.setup {
cmd = {DATA_PATH .. '/lspinstall/cmake/venv/bin/cmake-language-server'},
on_attach = require'lsp'.common_on_attach,
filetypes = {"cmake"},
require("lspconfig").cmake.setup {
cmd = { DATA_PATH .. "/lspinstall/cmake/venv/bin/cmake-language-server" },
on_attach = require("lsp").common_on_attach,
filetypes = { "cmake" },
}

View file

@ -1,9 +1,10 @@
-- npm install -g vscode-css-languageserver-bin
require'lspconfig'.cssls.setup {
cmd = {
"node", DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
"--stdio"
},
on_attach = require'lsp'.common_on_attach
require("lspconfig").cssls.setup {
cmd = {
"node",
DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
"--stdio",
},
on_attach = require("lsp").common_on_attach,
}
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -1,11 +1,11 @@
require'lspconfig'.dartls.setup{
cmd = { "dart", O.lang.dart.sdk_path, "--lsp" },
on_attach = require'lsp'.common_on_attach,
init_options = {
closingLabels = false,
flutterOutline = false,
onlyAnalyzeProjectsWithOpenFiles = false,
outline = false,
suggestFromUnimportedLibraries = true
}
require("lspconfig").dartls.setup {
cmd = { "dart", O.lang.dart.sdk_path, "--lsp" },
on_attach = require("lsp").common_on_attach,
init_options = {
closingLabels = false,
flutterOutline = false,
onlyAnalyzeProjectsWithOpenFiles = false,
outline = false,
suggestFromUnimportedLibraries = true,
},
}

View file

@ -1,6 +1,6 @@
-- npm install -g dockerfile-language-server-nodejs
require'lspconfig'.dockerls.setup {
cmd = {DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio"},
on_attach = require'lsp'.common_on_attach,
root_dir = vim.loop.cwd
require("lspconfig").dockerls.setup {
cmd = { DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio" },
on_attach = require("lsp").common_on_attach,
root_dir = vim.loop.cwd,
}

View file

@ -1,5 +1,5 @@
require'lspconfig'.elixirls.setup{
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh"};
require("lspconfig").elixirls.setup {
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
}
-- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir)

View file

@ -1,9 +1,9 @@
require'lspconfig'.elmls.setup {
cmd = {DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server"},
init_options= {
elmAnalyseTrigger = "change",
elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm",
elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test"
}
require("lspconfig").elmls.setup {
cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
init_options = {
elmAnalyseTrigger = "change",
elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm",
elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test",
},
}

View file

@ -1,6 +1,6 @@
-- TODO Remove this at some point
require'lspconfig'.elixirls.setup{
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh"};
require("lspconfig").elixirls.setup {
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
}
-- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir)

View file

@ -1,22 +1,22 @@
require'lspconfig'.gopls.setup {
cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}},
root_dir = require'lspconfig'.util.root_pattern(".git", "go.mod"),
init_options = {usePlaceholders = true, completeUnimported = true},
on_attach = require'lsp'.common_on_attach
require("lspconfig").gopls.setup {
cmd = { DATA_PATH .. "/lspinstall/go/gopls" },
settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } },
root_dir = require("lspconfig").util.root_pattern(".git", "go.mod"),
init_options = { usePlaceholders = true, completeUnimported = true },
on_attach = require("lsp").common_on_attach,
}
if O.lang.go.autoformat then
require('lv-utils').define_augroups({
_go_format = {
{'BufWritePre', '*.go', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
},
_go = {
-- Go generally requires Tabs instead of spaces.
{'FileType', 'go', 'setlocal tabstop=4'},
{'FileType', 'go', 'setlocal shiftwidth=4'},
{'FileType', 'go', 'setlocal softtabstop=4'},
{'FileType', 'go', 'setlocal noexpandtab'}
}
})
require("lv-utils").define_augroups {
_go_format = {
{ "BufWritePre", "*.go", "lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
_go = {
-- Go generally requires Tabs instead of spaces.
{ "FileType", "go", "setlocal tabstop=4" },
{ "FileType", "go", "setlocal shiftwidth=4" },
{ "FileType", "go", "setlocal softtabstop=4" },
{ "FileType", "go", "setlocal noexpandtab" },
},
}
end

View file

@ -1,2 +1,2 @@
-- npm install -g graphql-language-service-cli
require'lspconfig'.graphql.setup {on_attach = require'lsp'.common_on_attach}
require("lspconfig").graphql.setup { on_attach = require("lsp").common_on_attach }

View file

@ -2,9 +2,13 @@
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
require'lspconfig'.html.setup {
cmd = {"node", DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js", "--stdio"},
on_attach = require'lsp'.common_on_attach,
capabilities = capabilities
require("lspconfig").html.setup {
cmd = {
"node",
DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
"--stdio",
},
on_attach = require("lsp").common_on_attach,
capabilities = capabilities,
}
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -1,4 +1,4 @@
local util = require 'lspconfig/util'
local util = require "lspconfig/util"
-- In Vimscript
-- augroup lsp
-- au!
@ -20,17 +20,17 @@ local util = require 'lspconfig/util'
-- };
local on_attach = function(client, bufr)
-- require('jdtls').setup_dap()
require'lsp'.common_on_attach(client, bufr)
-- require('jdtls').setup_dap()
require("lsp").common_on_attach(client, bufr)
end
require'lspconfig'.jdtls.setup {
on_attach = on_attach,
cmd = {DATA_PATH .. "/lspinstall/java/jdtls.sh"},
filetypes = { "java" },
root_dir = util.root_pattern({'.git', 'build.gradle', 'pom.xml'}),
-- init_options = {bundles = bundles}
-- on_attach = require'lsp'.common_on_attach
require("lspconfig").jdtls.setup {
on_attach = on_attach,
cmd = { DATA_PATH .. "/lspinstall/java/jdtls.sh" },
filetypes = { "java" },
root_dir = util.root_pattern { ".git", "build.gradle", "pom.xml" },
-- init_options = {bundles = bundles}
-- on_attach = require'lsp'.common_on_attach
}
-- require('jdtls').start_or_attach({
@ -41,10 +41,10 @@ require'lspconfig'.jdtls.setup {
-- })
-- TODO setup autoformat stuff later
-- _java = {
-- -- {'FileType', 'java', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},
-- {
-- 'FileType', 'java',
-- 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'
-- }
-- }
-- _java = {
-- -- {'FileType', 'java', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},
-- {
-- 'FileType', 'java',
-- 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'
-- }
-- }

View file

@ -7,64 +7,67 @@
-- require'completion'.on_attach(client)
-- require'illuminate'.on_attach(client)
-- end
require'lspconfig'.tsserver.setup {
cmd = {
DATA_PATH ..
"/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio"
},
filetypes = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
},
on_attach = require'lsp'.tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require('lspconfig/util').root_pattern("package.json",
"tsconfig.json",
"jsconfig.json", ".git"),
settings = {documentFormatting = false},
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true
})
}
require("lspconfig").tsserver.setup {
cmd = {
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio",
},
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
on_attach = require("lsp").tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require("lspconfig/util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
settings = { documentFormatting = false },
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true,
}),
},
}
require'lsp.ts-fmt-lint'.setup()
require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require('lv-utils').define_augroups({
_javascript_autoformat = {
{
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
'BufWritePre', '*.js',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_javascriptreact_autoformat = {
{
'BufWritePre', '*.jsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescript_autoformat = {
{
'BufWritePre', '*.ts',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescriptreact_autoformat = {
{
'BufWritePre', '*.tsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -7,64 +7,67 @@
-- require'completion'.on_attach(client)
-- require'illuminate'.on_attach(client)
-- end
require'lspconfig'.tsserver.setup {
cmd = {
DATA_PATH ..
"/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio"
},
filetypes = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
},
on_attach = require'lsp'.tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require('lspconfig/util').root_pattern("package.json",
"tsconfig.json",
"jsconfig.json", ".git"),
settings = {documentFormatting = false},
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true
})
}
require("lspconfig").tsserver.setup {
cmd = {
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio",
},
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
on_attach = require("lsp").tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require("lspconfig/util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
settings = { documentFormatting = false },
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true,
}),
},
}
require'lsp.ts-fmt-lint'.setup()
require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require('lv-utils').define_augroups({
_javascript_autoformat = {
{
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
'BufWritePre', '*.js',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_javascriptreact_autoformat = {
{
'BufWritePre', '*.jsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescript_autoformat = {
{
'BufWritePre', '*.ts',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescriptreact_autoformat = {
{
'BufWritePre', '*.tsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -1,28 +1,29 @@
-- npm install -g vscode-json-languageserver
require'lspconfig'.jsonls.setup {
cmd = {
"node", DATA_PATH ..
"/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
"--stdio"
},
on_attach = require'lsp'.common_on_attach,
require("lspconfig").jsonls.setup {
cmd = {
"node",
DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
"--stdio",
},
on_attach = require("lsp").common_on_attach,
commands = {
Format = {
function()
vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
end
}
}
commands = {
Format = {
function()
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
end,
},
},
}
if O.lang.json.autoformat then
require('lv-utils').define_augroups({
_json_format = {
{
'BufWritePre', '*.json',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
require("lv-utils").define_augroups {
_json_format = {
{
"BufWritePre",
"*.json",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end

View file

@ -6,31 +6,29 @@
--- https://github.com/udalov/kotlin-vim (recommended)
--- Note that there is no LICENSE specified yet.
local util = require 'lspconfig/util'
local util = require "lspconfig/util"
local bin_name = DATA_PATH .. "/lspinstall/kotlin/server/bin/kotlin-language-server"
if vim.fn.has('win32') == 1 then
bin_name = bin_name..".bat"
if vim.fn.has "win32" == 1 then
bin_name = bin_name .. ".bat"
end
local root_files = {
'settings.gradle', -- Gradle (multi-project)
'settings.gradle.kts', -- Gradle (multi-project)
'build.xml', -- Ant
'pom.xml', -- Maven
"settings.gradle", -- Gradle (multi-project)
"settings.gradle.kts", -- Gradle (multi-project)
"build.xml", -- Ant
"pom.xml", -- Maven
}
local fallback_root_files = {
'build.gradle', -- Gradle
'build.gradle.kts', -- Gradle
"build.gradle", -- Gradle
"build.gradle.kts", -- Gradle
}
require'lspconfig'.kotlin_language_server.setup {
cmd = {bin_name},
on_attach = require'lsp'.common_on_attach,
root_dir = function(fname)
return util.root_pattern(unpack(root_files))(fname) or
util.root_pattern(unpack(fallback_root_files))(fname)
end
require("lspconfig").kotlin_language_server.setup {
cmd = { bin_name },
on_attach = require("lsp").common_on_attach,
root_dir = function(fname)
return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
end,
}

View file

@ -2,71 +2,72 @@
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
require'lspconfig'.sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
on_attach = require'lsp'.common_on_attach,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = vim.split(package.path, ';')
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'}
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true
},
maxPreload = 100000,
preloadFileSize = 1000
}
}
}
require("lspconfig").sumneko_lua.setup {
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
on_attach = require("lsp").common_on_attach,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
-- Setup your lua path
path = vim.split(package.path, ";"),
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
maxPreload = 100000,
preloadFileSize = 1000,
},
},
},
}
if O.lang.lua.autoformat then
require('lv-utils').define_augroups({
_lua_autoformat = {
{
'BufWritePre', '*.lua',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
require("lv-utils").define_augroups {
_lua_autoformat = {
{
"BufWritePre",
"*.lua",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
local lua_arguments = {}
local luaFormat = {
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=80",
formatStdin = true
formatCommand = "lua-format -i --no-keep-simple-function-one-line --column-limit=80",
formatStdin = true,
}
local lua_fmt = {
formatCommand = "luafmt --indent-count 2 --line-width 120 --stdin",
formatStdin = true
formatCommand = "luafmt --indent-count 2 --line-width 120 --stdin",
formatStdin = true,
}
if O.lang.lua.formatter == 'lua-format' then
if O.lang.lua.formatter == "lua-format" then
table.insert(lua_arguments, luaFormat)
elseif O.lang.lua.formatter == 'lua-fmt' then
elseif O.lang.lua.formatter == "lua-fmt" then
table.insert(lua_arguments, lua_fmt)
end
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false},
filetypes = {"lua"},
settings = {
rootMarkers = {".git/"},
languages = {
lua = lua_arguments,
}
}
require("lspconfig").efm.setup {
-- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false },
filetypes = { "lua" },
settings = {
rootMarkers = { ".git/" },
languages = {
lua = lua_arguments,
},
},
}

View file

@ -1,25 +1,23 @@
require'lspconfig'.intelephense.setup {
cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
on_attach = require'lsp'.common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.php.diagnostics.virtual_text,
signs = O.lang.php.diagnostics.signs,
underline = O.lang.php.diagnostics.underline,
update_in_insert = true
})
require("lspconfig").intelephense.setup {
cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
on_attach = require("lsp").common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.php.diagnostics.virtual_text,
signs = O.lang.php.diagnostics.signs,
underline = O.lang.php.diagnostics.underline,
update_in_insert = true,
}),
},
filetypes = O.lang.php.filetypes,
settings = {
intelephense = {
format = {
braces = O.lang.php.format.braces,
},
environment = {
phpVersion = O.lang.php.environment.php_version,
},
},
filetypes = O.lang.php.filetypes,
settings = {
intelephense = {
format = {
braces = O.lang.php.format.braces
},
environment = {
phpVersion = O.lang.php.environment.php_version
},
}
};
},
}

View file

@ -2,86 +2,76 @@ local python_arguments = {}
-- TODO replace with path argument
local flake8 = {
LintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -",
lintStdin = true,
lintFormats = {"%f:%l:%c: %m"}
LintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -",
lintStdin = true,
lintFormats = { "%f:%l:%c: %m" },
}
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
local isort = { formatCommand = "isort --quiet -", formatStdin = true }
local yapf = {formatCommand = "yapf --quiet", formatStdin = true}
local black = {formatCommand = "black --quiet -", formatStdin = true}
local yapf = { formatCommand = "yapf --quiet", formatStdin = true }
local black = { formatCommand = "black --quiet -", formatStdin = true }
if O.lang.python.linter == 'flake8' then table.insert(python_arguments, flake8) end
if O.lang.python.isort then table.insert(python_arguments, isort) end
if O.lang.python.formatter == 'yapf' then
table.insert(python_arguments, yapf)
elseif O.lang.python.formatter == 'black' then
table.insert(python_arguments, black)
if O.lang.python.linter == "flake8" then
table.insert(python_arguments, flake8)
end
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false},
filetypes = {"python"},
settings = {
rootMarkers = {".git/", "requirements.txt"},
languages = {
python = python_arguments,
}
}
if O.lang.python.isort then
table.insert(python_arguments, isort)
end
if O.lang.python.formatter == "yapf" then
table.insert(python_arguments, yapf)
elseif O.lang.python.formatter == "black" then
table.insert(python_arguments, black)
end
require("lspconfig").efm.setup {
-- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false },
filetypes = { "python" },
settings = {
rootMarkers = { ".git/", "requirements.txt" },
languages = {
python = python_arguments,
},
},
}
-- npm i -g pyright
require'lspconfig'.pyright.setup {
cmd = {
DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
"--stdio"
require("lspconfig").pyright.setup {
cmd = {
DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
"--stdio",
},
on_attach = require("lsp").common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.python.diagnostics.virtual_text,
signs = O.lang.python.diagnostics.signs,
underline = O.lang.python.diagnostics.underline,
update_in_insert = true,
}),
},
settings = {
python = {
analysis = {
typeCheckingMode = O.lang.python.analysis.type_checking,
autoSearchPaths = O.lang.python.analysis.auto_search_paths,
useLibraryCodeForTypes = O.lang.python.analysis.use_library_code_types,
},
},
on_attach = require'lsp'.common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic
.on_publish_diagnostics,
{
virtual_text = O.lang.python.diagnostics.virtual_text,
signs = O.lang.python.diagnostics.signs,
underline = O.lang.python.diagnostics.underline,
update_in_insert = true
})
},
settings = {
python = {
analysis = {
typeCheckingMode = O.lang.python.analysis.type_checking,
autoSearchPaths = O.lang.python.analysis.auto_search_paths,
useLibraryCodeForTypes = O.lang.python.analysis
.use_library_code_types
}
}
}
},
}
if O.lang.python.autoformat then
require('lv-utils').define_augroups({
_python_autoformat = {
{
'BufWritePre', '*.py',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
require("lv-utils").define_augroups {
_python_autoformat = {
{
"BufWritePre",
"*.py",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end

View file

@ -1,24 +1,22 @@
-- If you are using rvm, make sure to change below configuration
require'lspconfig'.solargraph.setup {
cmd = {DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio"},
on_attach = require'lsp'.common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.ruby.diagnostics.virtual_text,
signs = O.lang.ruby.diagnostics.signs,
underline = O.lang.ruby.diagnostics.underline,
update_in_insert = true
})
},
filetypes = O.lang.ruby.filetypes
require("lspconfig").solargraph.setup {
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" },
on_attach = require("lsp").common_on_attach,
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.ruby.diagnostics.virtual_text,
signs = O.lang.ruby.diagnostics.signs,
underline = O.lang.ruby.diagnostics.underline,
update_in_insert = true,
}),
},
filetypes = O.lang.ruby.filetypes,
}
if O.lang.ruby.autoformat then
require('lv-utils').define_augroups({
_ruby_format = {
{'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
}
})
require("lv-utils").define_augroups {
_ruby_format = {
{ "BufWritePre", "*.rb", "lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -1,99 +1,101 @@
if O.lang.rust.rust_tools.active then
local opts = {
tools = { -- rust-tools options
-- automatically set inlay hints (type hints)
-- There is an issue due to which the hints are not applied on the first
-- opened file. For now, write to the file to trigger a reapplication of
-- the hints or just run :RustSetInlayHints.
-- default: true
autoSetHints = true,
local opts = {
tools = { -- rust-tools options
-- automatically set inlay hints (type hints)
-- There is an issue due to which the hints are not applied on the first
-- opened file. For now, write to the file to trigger a reapplication of
-- the hints or just run :RustSetInlayHints.
-- default: true
autoSetHints = true,
-- whether to show hover actions inside the hover window
-- this overrides the default hover handler
-- default: true
hover_with_actions = true,
-- whether to show hover actions inside the hover window
-- this overrides the default hover handler
-- default: true
hover_with_actions = true,
runnables = {
-- whether to use telescope for selection menu or not
-- default: true
use_telescope = true
runnables = {
-- whether to use telescope for selection menu or not
-- default: true
use_telescope = true,
-- rest of the opts are forwarded to telescope
},
-- rest of the opts are forwarded to telescope
},
inlay_hints = {
-- wheter to show parameter hints with the inlay hints or not
-- default: true
show_parameter_hints = true,
inlay_hints = {
-- wheter to show parameter hints with the inlay hints or not
-- default: true
show_parameter_hints = true,
-- prefix for parameter hints
-- default: "<-"
parameter_hints_prefix = "<-",
-- prefix for parameter hints
-- default: "<-"
parameter_hints_prefix = "<-",
-- prefix for all the other hints (type, chaining)
-- default: "=>"
other_hints_prefix = "=>",
-- prefix for all the other hints (type, chaining)
-- default: "=>"
other_hints_prefix = "=>",
-- whether to align to the lenght of the longest line in the file
max_len_align = false,
-- whether to align to the lenght of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7
},
-- padding from the right if right_align is true
right_align_padding = 7,
},
hover_actions = {
-- the border that is used for the hover window
-- see vim.api.nvim_open_win()
border = {
{"", "FloatBorder"}, {"", "FloatBorder"},
{"", "FloatBorder"}, {"", "FloatBorder"},
{"", "FloatBorder"}, {"", "FloatBorder"},
{"", "FloatBorder"}, {"", "FloatBorder"}
}
}
hover_actions = {
-- the border that is used for the hover window
-- see vim.api.nvim_open_win()
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
},
},
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
server = {
cmd = {DATA_PATH .. "/lspinstall/rust/rust-analyzer"},
on_attach = require'lsp'.common_on_attach
} -- rust-analyser options
}
require('rust-tools').setup(opts)
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
server = {
cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" },
on_attach = require("lsp").common_on_attach,
}, -- rust-analyser options
}
require("rust-tools").setup(opts)
else
require'lspconfig'.rust_analyzer.setup {
cmd = {DATA_PATH .. "/lspinstall/rust/rust-analyzer"},
on_attach = require'lsp'.common_on_attach,
filetypes = {"rust"},
root_dir = require'lspconfig.util'.root_pattern("Cargo.toml",
"rust-project.json")
}
require("lspconfig").rust_analyzer.setup {
cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" },
on_attach = require("lsp").common_on_attach,
filetypes = { "rust" },
root_dir = require("lspconfig.util").root_pattern("Cargo.toml", "rust-project.json"),
}
end
-- TODO fix these mappings
vim.api.nvim_exec([[
vim.api.nvim_exec(
[[
autocmd Filetype rust nnoremap <leader>lm <Cmd>RustExpandMacro<CR>
autocmd Filetype rust nnoremap <leader>lH <Cmd>RustToggleInlayHints<CR>
autocmd Filetype rust nnoremap <leader>le <Cmd>RustRunnables<CR>
autocmd Filetype rust nnoremap <leader>lh <Cmd>RustHoverActions<CR>
]], true)
]],
true
)
if O.lang.rust.autoformat then
require('lv-utils').define_augroups({
_rust_format = {
{'BufWritePre', '*.rs', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
}
})
require("lv-utils").define_augroups {
_rust_format = {
{ "BufWritePre", "*.rs", "lua vim.lsp.buf.formatting_sync(nil,1000)" },
},
}
end

View file

@ -1,33 +1,37 @@
-- npm i -g bash-language-server
require'lspconfig'.bashls.setup {
cmd = {DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start"},
on_attach = require'lsp'.common_on_attach,
filetypes = { "sh", "zsh" }
require("lspconfig").bashls.setup {
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
on_attach = require("lsp").common_on_attach,
filetypes = { "sh", "zsh" },
}
-- sh
local sh_arguments = {}
local shfmt = {formatCommand = 'shfmt -ci -s -bn', formatStdin = true}
local shfmt = { formatCommand = "shfmt -ci -s -bn", formatStdin = true }
local shellcheck = {
LintCommand = 'shellcheck -f gcc -x',
lintFormats = {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
LintCommand = "shellcheck -f gcc -x",
lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" },
}
if O.lang.sh.formatter == 'shfmt' then table.insert(sh_arguments, shfmt) end
if O.lang.sh.formatter == "shfmt" then
table.insert(sh_arguments, shfmt)
end
if O.lang.sh.linter == 'shellcheck' then table.insert(sh_arguments, shellcheck) end
if O.lang.sh.linter == "shellcheck" then
table.insert(sh_arguments, shellcheck)
end
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false},
filetypes = {"sh"},
settings = {
rootMarkers = {".git/"},
languages = {
sh = sh_arguments,
}
}
require("lspconfig").efm.setup {
-- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false },
filetypes = { "sh" },
settings = {
rootMarkers = { ".git/" },
languages = {
sh = sh_arguments,
},
},
}

View file

@ -1,4 +1,4 @@
require'lspconfig'.texlab.setup{
cmd = {DATA_PATH .. "/lspinstall/latex/texlab"},
on_attach = require'lsp'.common_on_attach
require("lspconfig").texlab.setup {
cmd = { DATA_PATH .. "/lspinstall/latex/texlab" },
on_attach = require("lsp").common_on_attach,
}

View file

@ -1,5 +1,5 @@
require'lspconfig'.terraformls.setup{
cmd = {DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve"},
on_attach = require'lsp'.common_on_attach,
filetypes = { "tf", "terraform", "hcl" }
require("lspconfig").terraformls.setup {
cmd = { DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve" },
on_attach = require("lsp").common_on_attach,
filetypes = { "tf", "terraform", "hcl" },
}

View file

@ -7,64 +7,67 @@
-- require'completion'.on_attach(client)
-- require'illuminate'.on_attach(client)
-- end
require'lspconfig'.tsserver.setup {
cmd = {
DATA_PATH ..
"/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio"
},
filetypes = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
},
on_attach = require'lsp'.tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require('lspconfig/util').root_pattern("package.json",
"tsconfig.json",
"jsconfig.json", ".git"),
settings = {documentFormatting = false},
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true
})
}
require("lspconfig").tsserver.setup {
cmd = {
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio",
},
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
on_attach = require("lsp").tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require("lspconfig/util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
settings = { documentFormatting = false },
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true,
}),
},
}
require'lsp.ts-fmt-lint'.setup()
require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require('lv-utils').define_augroups({
_javascript_autoformat = {
{
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
'BufWritePre', '*.js',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_javascriptreact_autoformat = {
{
'BufWritePre', '*.jsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescript_autoformat = {
{
'BufWritePre', '*.ts',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescriptreact_autoformat = {
{
'BufWritePre', '*.tsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -7,64 +7,67 @@
-- require'completion'.on_attach(client)
-- require'illuminate'.on_attach(client)
-- end
require'lspconfig'.tsserver.setup {
cmd = {
DATA_PATH ..
"/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio"
},
filetypes = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
},
on_attach = require'lsp'.tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require('lspconfig/util').root_pattern("package.json",
"tsconfig.json",
"jsconfig.json", ".git"),
settings = {documentFormatting = false},
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true
})
}
require("lspconfig").tsserver.setup {
cmd = {
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
"--stdio",
},
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
on_attach = require("lsp").tsserver_on_attach,
-- This makes sure tsserver is not used for formatting (I prefer prettier)
-- on_attach = require'lsp'.common_on_attach,
root_dir = require("lspconfig/util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
settings = { documentFormatting = false },
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = O.lang.tsserver.diagnostics.virtual_text,
signs = O.lang.tsserver.diagnostics.signs,
underline = O.lang.tsserver.diagnostics.underline,
update_in_insert = true,
}),
},
}
require'lsp.ts-fmt-lint'.setup()
require("lsp.ts-fmt-lint").setup()
if O.lang.tsserver.autoformat then
require('lv-utils').define_augroups({
_javascript_autoformat = {
{
require("lv-utils").define_augroups {
_javascript_autoformat = {
{
'BufWritePre', '*.js',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_javascriptreact_autoformat = {
{
'BufWritePre', '*.jsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescript_autoformat = {
{
'BufWritePre', '*.ts',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
},
_typescriptreact_autoformat = {
{
'BufWritePre', '*.tsx',
'lua vim.lsp.buf.formatting_sync(nil, 1000)'
}
}
})
"BufWritePre",
"*.js",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_javascriptreact_autoformat = {
{
"BufWritePre",
"*.jsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescript_autoformat = {
{
"BufWritePre",
"*.ts",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
_typescriptreact_autoformat = {
{
"BufWritePre",
"*.tsx",
"lua vim.lsp.buf.formatting_sync(nil, 1000)",
},
},
}
end
vim.cmd("setl ts=2 sw=2")
vim.cmd "setl ts=2 sw=2"

View file

@ -1,5 +1,5 @@
-- npm install -g vim-language-server
require'lspconfig'.vimls.setup {
cmd = {DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server", "--stdio"},
on_attach = require'lsp'.common_on_attach
require("lspconfig").vimls.setup {
cmd = { DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server", "--stdio" },
on_attach = require("lsp").common_on_attach,
}

View file

@ -1,5 +1,5 @@
require('lspconfig').vuels.setup {
cmd = {DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", "--stdio"},
on_attach = require'lsp'.common_on_attach,
root_dir = require('lspconfig').util.root_pattern(".git", ".")
require("lspconfig").vuels.setup {
cmd = { DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", "--stdio" },
on_attach = require("lsp").common_on_attach,
root_dir = require("lspconfig").util.root_pattern(".git", "."),
}

View file

@ -1,6 +1,6 @@
-- npm install -g yaml-language-server
require'lspconfig'.yamlls.setup{
cmd = {DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio"},
on_attach = require'lsp'.common_on_attach,
require("lspconfig").yamlls.setup {
cmd = { DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio" },
on_attach = require("lsp").common_on_attach,
}
vim.cmd("setl ts=2 sw=2 ts=2 ai et")
vim.cmd "setl ts=2 sw=2 ts=2 ai et"

View file

@ -1,15 +1,15 @@
-- Because lspinstall don't support zig yet,
-- So we need zls preset in global lib
-- Further custom install zls in
-- Further custom install zls in
-- https://github.com/zigtools/zls/wiki/Downloading-and-Building-ZLS
require'lspconfig'.zls.setup{
root_dir = require'lspconfig'.util.root_pattern(".git", "build.zig", "zls.json"),
on_attach = require'lsp'.common_on_attach,
require("lspconfig").zls.setup {
root_dir = require("lspconfig").util.root_pattern(".git", "build.zig", "zls.json"),
on_attach = require("lsp").common_on_attach,
}
require('lv-utils').define_augroups({
_zig_autoformat = {
{'BufWritePre', '*.zig', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'},
{'BufEnter', '*.zig', ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")'}
}
})
vim.cmd("setl expandtab tabstop=8 softtabstop=4 shiftwidth=4")
require("lv-utils").define_augroups {
_zig_autoformat = {
{ "BufWritePre", "*.zig", "lua vim.lsp.buf.formatting_sync(nil, 1000)" },
{ "BufEnter", "*.zig", ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")' },
},
}
vim.cmd "setl expandtab tabstop=8 softtabstop=4 shiftwidth=4"

View file

@ -1,40 +1,44 @@
-- npm i -g bash-language-server
require'lspconfig'.bashls.setup {
cmd = {DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start"},
on_attach = require'lsp'.common_on_attach,
filetypes = { "sh", "zsh" }
require("lspconfig").bashls.setup {
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
on_attach = require("lsp").common_on_attach,
filetypes = { "sh", "zsh" },
}
-- npm i -g bash-language-server
require'lspconfig'.bashls.setup {
cmd = {DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start"},
on_attach = require'lsp'.common_on_attach,
filetypes = { "sh", "zsh" }
require("lspconfig").bashls.setup {
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
on_attach = require("lsp").common_on_attach,
filetypes = { "sh", "zsh" },
}
-- sh
local sh_arguments = {}
local shfmt = {formatCommand = 'shfmt -ci -s -bn', formatStdin = true}
local shfmt = { formatCommand = "shfmt -ci -s -bn", formatStdin = true }
local shellcheck = {
LintCommand = 'shellcheck -f gcc -x',
lintFormats = {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
LintCommand = "shellcheck -f gcc -x",
lintFormats = { "%f:%l:%c: %trror: %m", "%f:%l:%c: %tarning: %m", "%f:%l:%c: %tote: %m" },
}
if O.lang.sh.formatter == 'shfmt' then table.insert(sh_arguments, shfmt) end
if O.lang.sh.formatter == "shfmt" then
table.insert(sh_arguments, shfmt)
end
if O.lang.sh.linter == 'shellcheck' then table.insert(sh_arguments, shellcheck) end
if O.lang.sh.linter == "shellcheck" then
table.insert(sh_arguments, shellcheck)
end
require"lspconfig".efm.setup {
-- init_options = {initializationOptions},
cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},
init_options = {documentFormatting = true, codeAction = false},
filetypes = {"zsh"},
settings = {
rootMarkers = {".git/"},
languages = {
sh = sh_arguments,
}
}
require("lspconfig").efm.setup {
-- init_options = {initializationOptions},
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
init_options = { documentFormatting = true, codeAction = false },
filetypes = { "zsh" },
settings = {
rootMarkers = { ".git/" },
languages = {
sh = sh_arguments,
},
},
}

View file

@ -1,11 +1,13 @@
require('default-config')
require('keymappings')
vim.cmd('luafile ' .. CONFIG_PATH .. '/lv-config.lua')
require('settings')
require('plugins')
require('lv-utils')
require('lv-galaxyline')
require('lv-treesitter')
require('lv-which-key')
require('lsp')
if O.lang.emmet.active then require('lsp.emmet-ls') end
require "default-config"
require "keymappings"
vim.cmd("luafile " .. CONFIG_PATH .. "/lv-config.lua")
require "settings"
require "plugins"
require "lv-utils"
require "lv-galaxyline"
require "lv-treesitter"
require "lv-which-key"
require "lsp"
if O.lang.emmet.active then
require "lsp.emmet-ls"
end

View file

@ -1,280 +1,288 @@
CONFIG_PATH = vim.fn.stdpath('config')
DATA_PATH = vim.fn.stdpath('data')
CACHE_PATH = vim.fn.stdpath('cache')
TERMINAL = vim.fn.expand('$TERMINAL')
CONFIG_PATH = vim.fn.stdpath "config"
DATA_PATH = vim.fn.stdpath "data"
CACHE_PATH = vim.fn.stdpath "cache"
TERMINAL = vim.fn.expand "$TERMINAL"
O = {
auto_close_tree = 0,
auto_complete = true,
colorscheme = 'lunar',
hidden_files = true,
wrap_lines = false,
number = true,
relative_number = true,
cursorline = true,
shell = 'bash',
timeoutlen = 100,
nvim_tree_disable_netrw = 0,
extras = false,
ignore_case = true,
smart_case = true,
lushmode = false,
hl_search = false,
transparent_window = false;
leader_key = "space";
vnsip_dir = vim.fn.stdpath('config') .. "/snippets",
auto_close_tree = 0,
auto_complete = true,
colorscheme = "lunar",
hidden_files = true,
wrap_lines = false,
number = true,
relative_number = true,
cursorline = true,
shell = "bash",
timeoutlen = 100,
nvim_tree_disable_netrw = 0,
extras = false,
ignore_case = true,
smart_case = true,
lushmode = false,
hl_search = false,
transparent_window = false,
leader_key = "space",
vnsip_dir = vim.fn.stdpath "config" .. "/snippets",
-- @usage pass a table with your desired languages
treesitter = {
ensure_installed = "all",
ignore_install = {"haskell"},
highlight = {enabled = true},
rainbow = {enabled = false}
-- @usage pass a table with your desired languages
treesitter = {
ensure_installed = "all",
ignore_install = { "haskell" },
highlight = { enabled = true },
rainbow = { enabled = false },
},
database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },
plugin = {
hop = { active = false },
dial = { active = false },
dashboard = { active = false },
matchup = { active = false },
colorizer = { active = false },
numb = { active = false },
zen = { active = false },
ts_playground = { active = false },
indent_line = { active = false },
ts_context_commentstring = { active = false },
symbol_outline = { active = false },
debug = { active = false },
bqf = { active = false },
trouble = { active = false },
floatterm = { active = false },
spectre = { active = false },
lsp_rooter = { active = false },
markdown_preview = { active = false },
codi = { active = false },
telescope_fzy = { active = false },
sanegx = { active = false },
snap = { active = false },
ranger = { active = false },
todo_comments = { active = false },
lsp_colors = { active = false },
git_blame = { active = false },
gist = { active = false },
gitlinker = { active = false },
lazygit = { active = false },
octo = { active = false },
lush = { active = false },
diffview = { active = false },
bracey = { active = false },
telescope_project = { active = false },
dap_install = { active = false },
tabnine = { active = false },
},
lang = {
python = {
linter = "",
-- @usage can be 'yapf', 'black'
formatter = "",
autoformat = false,
isort = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
analysis = {
type_checking = "basic",
auto_search_paths = true,
use_library_code_types = true,
},
},
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
plugin = {
hop = {active = false},
dial = {active = false},
dashboard = {active = false},
matchup = {active = false},
colorizer = {active = false},
numb = {active = false},
zen = {active = false},
ts_playground = {active = false},
indent_line = {active = false},
ts_context_commentstring = {active = false},
symbol_outline = {active = false},
debug = {active = false},
bqf = {active = false},
trouble = {active = false},
floatterm = {active = false},
spectre = {active = false},
lsp_rooter = {active = false},
markdown_preview = {active = false},
codi = {active = false},
telescope_fzy = {active = false},
sanegx = {active = false},
snap = {active = false},
ranger = {active = false},
todo_comments = {active = false},
lsp_colors = {active = false},
git_blame = {active = false},
gist = {active = false},
gitlinker = {active = false},
lazygit = {active = false},
octo = {active = false},
lush = {active = false},
diffview = {active = false},
bracey = {active = false},
telescope_project = {active = false},
dap_install = {active = false},
tabnine = {active = false}
dart = {
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
},
lang = {
python = {
linter = '',
-- @usage can be 'yapf', 'black'
formatter = '',
autoformat = false,
isort = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
},
analysis = {
type_checking = "basic",
auto_search_paths = true,
use_library_code_types = true
}
},
dart = {
sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'
},
lua = {
-- @usage can be 'lua-format'
formatter = '',
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
}
},
sh = {
-- @usage can be 'shellcheck'
linter = '',
-- @usage can be 'shfmt'
formatter = '',
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
}
},
tsserver = {
-- @usage can be 'eslint'
linter = '',
-- @usage can be 'prettier'
formatter = '',
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
}
},
json = {
-- @usage can be 'prettier'
formatter = '',
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
}
},
tailwindcss = {
filetypes = {
'html', 'css', 'scss', 'javascript', 'javascriptreact',
'typescript', 'typescriptreact'
}
},
clang = {
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true,
},
cross_file_rename = true,
header_insertion = 'never',
autoformat = false -- update this to true for enabling autoformat
},
ruby = {
diagnostics = {
virtualtext = {spacing = 0, prefix = ""},
signs = true,
underline = true
},
filetypes = {'rb', 'erb', 'rakefile', 'ruby'}
},
go = {},
elixir = {},
vim = {},
yaml = {},
terraform = {},
rust = {
rust_tools = {
active = false
},
linter = '',
formatter = '',
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
}
},
svelte = {},
php = {
format = {
braces = "psr12"
},
environment = {
php_version = "7.4"
},
autoformat = false,
diagnostics = {
virtual_text = {spacing = 0, prefix = ""},
signs = true,
underline = true
},
filetypes = {'php', 'phtml'}
},
latex = {},
kotlin = {},
html = {},
elm = {},
emmet = {active = true},
graphql = {},
efm = {},
docker = {},
cmake = {},
java = {},
css = {
formatter = '',
autoformat = false,
virtual_text = true
}
lua = {
-- @usage can be 'lua-format'
formatter = "",
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
sh = {
-- @usage can be 'shellcheck'
linter = "",
-- @usage can be 'shfmt'
formatter = "",
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
tsserver = {
-- @usage can be 'eslint'
linter = "",
-- @usage can be 'prettier'
formatter = "",
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
json = {
-- @usage can be 'prettier'
formatter = "",
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
tailwindcss = {
filetypes = {
"html",
"css",
"scss",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
},
},
clang = {
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
cross_file_rename = true,
header_insertion = "never",
autoformat = false, -- update this to true for enabling autoformat
},
ruby = {
diagnostics = {
virtualtext = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
filetypes = { "rb", "erb", "rakefile", "ruby" },
},
go = {},
elixir = {},
vim = {},
yaml = {},
terraform = {},
rust = {
rust_tools = {
active = false,
},
linter = "",
formatter = "",
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
},
svelte = {},
php = {
format = {
braces = "psr12",
},
environment = {
php_version = "7.4",
},
autoformat = false,
diagnostics = {
virtual_text = { spacing = 0, prefix = "" },
signs = true,
underline = true,
},
filetypes = { "php", "phtml" },
},
latex = {},
kotlin = {},
html = {},
elm = {},
emmet = { active = true },
graphql = {},
efm = {},
docker = {},
cmake = {},
java = {},
css = {
formatter = "",
autoformat = false,
virtual_text = true,
},
},
dashboard = {
dashboard = {
custom_header = {
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
},
footer = {'chrisatmachine.com'}
}
custom_header = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
" ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
" ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
},
footer = { "chrisatmachine.com" },
},
}
-- TODO find a new home for these autocommands
require('lv-utils').define_augroups({
_general_settings = {
{
'TextYankPost', '*',
'lua require(\'vim.highlight\').on_yank({higroup = \'Search\', timeout = 200})'
}, {
'BufWinEnter', '*',
'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'
},
{
'BufRead', '*',
'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'
}, {
'BufNewFile', '*',
'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'
}, {'VimLeavePre', '*', 'set title set titleold='},
{'FileType', 'qf', 'set nobuflisted'}
require("lv-utils").define_augroups {
_general_settings = {
{
"TextYankPost",
"*",
"lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})",
},
-- _solidity = {
-- {'BufWinEnter', '.sol', 'setlocal filetype=solidity'}, {'BufRead', '*.sol', 'setlocal filetype=solidity'},
-- {'BufNewFile', '*.sol', 'setlocal filetype=solidity'}
-- },
-- _gemini = {
-- {'BufWinEnter', '.gmi', 'setlocal filetype=markdown'}, {'BufRead', '*.gmi', 'setlocal filetype=markdown'},
-- {'BufNewFile', '*.gmi', 'setlocal filetype=markdown'}
-- },
_markdown = {
{'FileType', 'markdown', 'setlocal wrap'},
{'FileType', 'markdown', 'setlocal spell'}
{
"BufWinEnter",
"*",
"setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
},
_buffer_bindings = {
{'FileType', 'floaterm', 'nnoremap <silent> <buffer> q :q<CR>'}
}
})
{
"BufRead",
"*",
"setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
},
{
"BufNewFile",
"*",
"setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
},
{ "VimLeavePre", "*", "set title set titleold=" },
{ "FileType", "qf", "set nobuflisted" },
},
-- _solidity = {
-- {'BufWinEnter', '.sol', 'setlocal filetype=solidity'}, {'BufRead', '*.sol', 'setlocal filetype=solidity'},
-- {'BufNewFile', '*.sol', 'setlocal filetype=solidity'}
-- },
-- _gemini = {
-- {'BufWinEnter', '.gmi', 'setlocal filetype=markdown'}, {'BufRead', '*.gmi', 'setlocal filetype=markdown'},
-- {'BufNewFile', '*.gmi', 'setlocal filetype=markdown'}
-- },
_markdown = {
{ "FileType", "markdown", "setlocal wrap" },
{ "FileType", "markdown", "setlocal spell" },
},
_buffer_bindings = {
{ "FileType", "floaterm", "nnoremap <silent> <buffer> q :q<CR>" },
},
}

View file

@ -1,12 +1,12 @@
-- better window movement
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true})
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {silent = true})
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true})
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true})
vim.api.nvim_set_keymap("n", "<C-h>", "<C-w>h", { silent = true })
vim.api.nvim_set_keymap("n", "<C-j>", "<C-w>j", { silent = true })
vim.api.nvim_set_keymap("n", "<C-k>", "<C-w>k", { silent = true })
vim.api.nvim_set_keymap("n", "<C-l>", "<C-w>l", { silent = true })
-- TODO fix this
-- Terminal window navigation
vim.cmd([[
vim.cmd [[
tnoremap <C-h> <C-\><C-N><C-w>h
tnoremap <C-j> <C-\><C-N><C-w>j
tnoremap <C-k> <C-\><C-N><C-w>k
@ -16,50 +16,50 @@ vim.cmd([[
inoremap <C-k> <C-\><C-N><C-w>k
inoremap <C-l> <C-\><C-N><C-w>l
tnoremap <Esc> <C-\><C-n>
]])
]]
-- TODO fix this
-- resize with arrows
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -2<CR>', {silent = true})
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +2<CR>', {silent = true})
vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize -2<CR>', {silent = true})
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize +2<CR>', {silent = true})
vim.api.nvim_set_keymap("n", "<C-Up>", ":resize -2<CR>", { silent = true })
vim.api.nvim_set_keymap("n", "<C-Down>", ":resize +2<CR>", { silent = true })
vim.api.nvim_set_keymap("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
vim.api.nvim_set_keymap("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
-- better indenting
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap("v", "<", "<gv", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", ">", ">gv", { noremap = true, silent = true })
-- I hate escape
vim.api.nvim_set_keymap('i', 'jk', '<ESC>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', 'kj', '<ESC>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', 'jj', '<ESC>', {noremap = true, silent = true})
vim.api.nvim_set_keymap("i", "jk", "<ESC>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "kj", "<ESC>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "jj", "<ESC>", { noremap = true, silent = true })
-- Tab switch buffer
vim.api.nvim_set_keymap('n', '<TAB>', ':bnext<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<TAB>", ":bnext<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<S-TAB>", ":bprevious<CR>", { noremap = true, silent = true })
-- Move selected line / block of text in visual mode
vim.api.nvim_set_keymap('x', 'K', ':move \'<-2<CR>gv-gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', 'J', ':move \'>+1<CR>gv-gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap("x", "K", ":move '<-2<CR>gv-gv", { noremap = true, silent = true })
vim.api.nvim_set_keymap("x", "J", ":move '>+1<CR>gv-gv", { noremap = true, silent = true })
-- Move current line / block with Alt-j/k ala vscode.
vim.api.nvim_set_keymap('n', '<A-j>', ':m .+1<CR>==', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<A-k>', ':m .-2<CR>==', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', '<A-j>', '<Esc>:m .+1<CR>==gi', {noremap = true, silent = true})
vim.api.nvim_set_keymap('i', '<A-k>', '<Esc>:m .-2<CR>==gi', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', '<A-j>', ':m \'>+1<CR>gv-gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap('x', '<A-k>', ':m \'<-2<CR>gv-gv', {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<A-j>", ":m .+1<CR>==", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<A-k>", ":m .-2<CR>==", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "<A-j>", "<Esc>:m .+1<CR>==gi", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "<A-k>", "<Esc>:m .-2<CR>==gi", { noremap = true, silent = true })
vim.api.nvim_set_keymap("x", "<A-j>", ":m '>+1<CR>gv-gv", { noremap = true, silent = true })
vim.api.nvim_set_keymap("x", "<A-k>", ":m '<-2<CR>gv-gv", { noremap = true, silent = true })
-- QuickFix
vim.api.nvim_set_keymap('n', ']q', ':cnext<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '[q', ':cprev<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "]q", ":cnext<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "[q", ":cprev<CR>", { noremap = true, silent = true })
-- Better nav for omnicomplete
vim.cmd('inoremap <expr> <c-j> (\"\\<C-n>\")')
vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")')
vim.cmd 'inoremap <expr> <c-j> ("\\<C-n>")'
vim.cmd 'inoremap <expr> <c-k> ("\\<C-p>")'
vim.cmd('vnoremap p "0p')
vim.cmd('vnoremap P "0P')
vim.cmd 'vnoremap p "0p'
vim.cmd 'vnoremap P "0P'
-- vim.api.nvim_set_keymap('v', 'p', '"0p', {silent = true})
-- vim.api.nvim_set_keymap('v', 'P', '"0P', {silent = true})
@ -76,4 +76,4 @@ vim.cmd('vnoremap P "0P')
-- ]])
-- Toggle the QuickFix window
vim.api.nvim_set_keymap('', '<C-q>', ':call QuickFixToggle()<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap("", "<C-q>", ":call QuickFixToggle()<CR>", { noremap = true, silent = true })

View file

@ -1,47 +1,47 @@
-- if not package.loaded['nvim-autopairs'] then
-- return
-- end
local npairs = require('nvim-autopairs')
local Rule = require('nvim-autopairs.rule')
local npairs = require "nvim-autopairs"
local Rule = require "nvim-autopairs.rule"
-- skip it, if you use another global object
_G.MUtils = {}
vim.g.completion_confirm_key = ""
MUtils.completion_confirm = function()
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info()["selected"] ~= -1 then
return vim.fn["compe#confirm"](npairs.esc("<cr>"))
else
return npairs.esc("<cr>")
end
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info()["selected"] ~= -1 then
return vim.fn["compe#confirm"](npairs.esc "<cr>")
else
return npairs.autopairs_cr()
return npairs.esc "<cr>"
end
else
return npairs.autopairs_cr()
end
end
if package.loaded['compe'] then
require("nvim-autopairs.completion.compe").setup({
map_cr = true, -- map <CR> on insert mode
map_complete = true -- it will auto insert `(` after select function or method item
})
if package.loaded["compe"] then
require("nvim-autopairs.completion.compe").setup {
map_cr = true, -- map <CR> on insert mode
map_complete = true, -- it will auto insert `(` after select function or method item
}
end
npairs.setup({
check_ts = true,
ts_config = {
lua = {'string'}, -- it will not add pair on that treesitter node
javascript = {'template_string'},
java = false -- don't check treesitter on java
}
})
npairs.setup {
check_ts = true,
ts_config = {
lua = { "string" }, -- it will not add pair on that treesitter node
javascript = { "template_string" },
java = false, -- don't check treesitter on java
},
}
require('nvim-treesitter.configs').setup {autopairs = {enable = true}}
require("nvim-treesitter.configs").setup { autopairs = { enable = true } }
local ts_conds = require('nvim-autopairs.ts-conds')
local ts_conds = require "nvim-autopairs.ts-conds"
-- press % => %% is only inside comment or string
npairs.add_rules({
Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node({'string', 'comment'})),
Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node({'function'}))
})
npairs.add_rules {
Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node { "string", "comment" }),
Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node { "function" }),
}

View file

@ -1,76 +1,73 @@
local M = {}
M.config = function()
-- Buffer line setup
require'bufferline'.setup {
options = {
indicator_icon = '',
buffer_close_icon = '',
modified_icon = '',
close_icon = '',
close_command = "bdelete %d",
right_mouse_command = "bdelete! %d",
left_trunc_marker = '',
right_trunc_marker = '',
offsets = {
{
filetype = "NvimTree",
text = "",
text_align = "center",
padding = 1
}
},
show_tab_indicators = true,
show_close_icon = false
-- Buffer line setup
require("bufferline").setup {
options = {
indicator_icon = "",
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
close_command = "bdelete %d",
right_mouse_command = "bdelete! %d",
left_trunc_marker = "",
right_trunc_marker = "",
offsets = {
{
filetype = "NvimTree",
text = "",
text_align = "center",
padding = 1,
},
highlights = {
fill = {
guifg = {attribute = "fg", highlight = "Normal"},
guibg = {attribute = "bg", highlight = "StatusLineNC"}
},
-- background = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- buffer_visible = {
-- gui = "",
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- buffer_selected = {
-- gui = "",
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- separator = {
-- guifg = {attribute = "bg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- separator_selected = {
-- guifg = {attribute = "fg", highlight = "Special"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- separator_visible = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLineNC"}
-- },
-- close_button = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- close_button_selected = {
-- guifg = {attribute = "fg", highlight = "normal"},
-- guibg = {attribute = "bg", highlight = "normal"}
-- },
-- close_button_visible = {
-- guifg = {attribute = "fg", highlight = "normal"},
-- guibg = {attribute = "bg", highlight = "normal"}
-- }
}
}
},
show_tab_indicators = true,
show_close_icon = false,
},
highlights = {
fill = {
guifg = { attribute = "fg", highlight = "Normal" },
guibg = { attribute = "bg", highlight = "StatusLineNC" },
},
-- background = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- buffer_visible = {
-- gui = "",
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- buffer_selected = {
-- gui = "",
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- separator = {
-- guifg = {attribute = "bg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- separator_selected = {
-- guifg = {attribute = "fg", highlight = "Special"},
-- guibg = {attribute = "bg", highlight = "Normal"}
-- },
-- separator_visible = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLineNC"}
-- },
-- close_button = {
-- guifg = {attribute = "fg", highlight = "Normal"},
-- guibg = {attribute = "bg", highlight = "StatusLine"}
-- },
-- close_button_selected = {
-- guifg = {attribute = "fg", highlight = "normal"},
-- guibg = {attribute = "bg", highlight = "normal"}
-- },
-- close_button_visible = {
-- guifg = {attribute = "fg", highlight = "normal"},
-- guibg = {attribute = "bg", highlight = "normal"}
-- }
},
}
end
return M

View file

@ -1,13 +1,10 @@
require'colorizer'.setup(
{'*';},
{
RGB = true; -- #RGB hex codes
RRGGBB = true; -- #RRGGBB hex codes
RRGGBBAA = true; -- #RRGGBBAA hex codes
rgb_fn = true; -- CSS rgb() and rgba() functions
hsl_fn = true; -- CSS hsl() and hsla() functions
css = true; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true; -- Enable all CSS *functions*: rgb_fn, hsl_fn
})
-- names = true; -- "Name" codes like Blue
require("colorizer").setup({ "*" }, {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
RRGGBBAA = true, -- #RRGGBBAA hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
})
-- names = true; -- "Name" codes like Blue

View file

@ -7,12 +7,12 @@ local M = {}
vim.g.vsnip_snippet_dir = O.vnsip_dir
M.config = function()
opt = {
opt = {
enabled = O.auto_complete,
autocomplete = true,
debug = false,
min_length = 1,
preselect = 'enable',
preselect = "enable",
throttle_time = 80,
source_timeout = 200,
incomplete_delay = 400,
@ -22,79 +22,78 @@ opt = {
documentation = true,
source = {
path = {kind = "  (Path)"},
buffer = {kind = "  (Buffer)"},
calc = {kind = "  (Calc)"},
vsnip = {kind = "  (Snippet)"},
nvim_lsp = {kind = "  (LSP)"},
-- nvim_lua = {kind = "  "},
nvim_lua = false,
spell = {kind = "  (Spell)"},
tags = false,
vim_dadbod_completion = true,
-- snippets_nvim = {kind = "  "},
-- ultisnips = {kind = "  "},
-- treesitter = {kind = "  "},
emoji = {kind = " ﲃ (Emoji)", filetypes={"markdown", "text"}}
-- for emoji press : (idk if that in compe tho)
}
}
path = { kind = "  (Path)" },
buffer = { kind = "  (Buffer)" },
calc = { kind = "  (Calc)" },
vsnip = { kind = "  (Snippet)" },
nvim_lsp = { kind = "  (LSP)" },
-- nvim_lua = {kind = "  "},
nvim_lua = false,
spell = { kind = "  (Spell)" },
tags = false,
vim_dadbod_completion = true,
-- snippets_nvim = {kind = "  "},
-- ultisnips = {kind = "  "},
-- treesitter = {kind = "  "},
emoji = { kind = " ﲃ (Emoji)", filetypes = { "markdown", "text" } },
-- for emoji press : (idk if that in compe tho)
},
}
if O.plugin.tabnine.active then
opt.source.tabnine = {kind = "", priority=200, max_reslts=6}
end
if O.plugin.tabnine.active then
opt.source.tabnine = { kind = "", priority = 200, max_reslts = 6 }
end
require'compe'.setup(opt)
require("compe").setup(opt)
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col('.') - 1
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
return true
local check_back_space = function()
local col = vim.fn.col "." - 1
if col == 0 or vim.fn.getline("."):sub(col, col):match "%s" then
return true
else
return false
return false
end
end
-- Use (s-)tab to:
--- move to prev/next item in completion menuone
--- jump to prev/next snippet's placeholder
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif vim.fn.call("vsnip#available", {1}) == 1 then
return t "<Plug>(vsnip-expand-or-jump)"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn['compe#complete']()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
return t "<Plug>(vsnip-jump-prev)"
else
return t "<S-Tab>"
-- Use (s-)tab to:
--- move to prev/next item in completion menuone
--- jump to prev/next snippet's placeholder
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif vim.fn.call("vsnip#available", { 1 }) == 1 then
return t "<Plug>(vsnip-expand-or-jump)"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn["compe#complete"]()
end
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif vim.fn.call("vsnip#jumpable", { -1 }) == 1 then
return t "<Plug>(vsnip-jump-prev)"
else
return t "<S-Tab>"
end
end
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", { expr = true })
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", { expr = true })
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true })
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true })
vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", {noremap = true, silent = true, expr = true})
vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", {noremap = true, silent = true, expr = true})
vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", {noremap = true, silent = true, expr = true})
vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", {noremap = true, silent = true, expr = true})
vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", {noremap = true, silent = true, expr = true})
vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-e>", "compe#close('<C-e>')", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-f>", "compe#scroll({ 'delta': +4 })", { noremap = true, silent = true, expr = true })
vim.api.nvim_set_keymap("i", "<C-d>", "compe#scroll({ 'delta': -4 })", { noremap = true, silent = true, expr = true })
end
return M

View file

@ -1,65 +1,70 @@
local M = {}
M.config = function()
vim.g.dashboard_disable_at_vimenter = 0
vim.g.dashboard_disable_at_vimenter = 0
vim.g.dashboard_custom_header = O.dashboard.custom_header
vim.g.dashboard_custom_header = O.dashboard.custom_header
vim.g.dashboard_default_executive = 'telescope'
vim.g.dashboard_default_executive = "telescope"
vim.g.dashboard_custom_section = {
a = {
description = {' Find File '},
command = 'Telescope find_files'
},
b = {
description = {' Recently Used Files'},
command = 'Telescope oldfiles'
},
c = {
description = {' Load Last Session '},
command = 'SessionLoad'
},
d = {
description = {' Find Word '},
command = 'Telescope live_grep'
},
e = {
description = {' Settings '},
command = ':e ' .. CONFIG_PATH .. '/lv-config.lua'
},
f = {
description = {' Neovim Config Files'},
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.g.dashboard_custom_section = {
a = {
description = { " Find File " },
command = "Telescope find_files",
},
b = {
description = { " Recently Used Files" },
command = "Telescope oldfiles",
},
c = {
description = { " Load Last Session " },
command = "SessionLoad",
},
d = {
description = { " Find Word " },
command = "Telescope live_grep",
},
e = {
description = { " Settings " },
command = ":e " .. CONFIG_PATH .. "/lv-config.lua",
},
f = {
description = { " Neovim Config Files" },
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.api.nvim_exec([[
vim.api.nvim_exec(
[[
let g:dashboard_custom_footer = ['LuaJIT loaded '..packages..' plugins']
]], false)
]],
false
)
-- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
-- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
-- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
-- vim.g.dashboard_custom_footer = O.dashboard.footer
-- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
-- vim.g.dashboard_custom_footer = O.dashboard.footer
end
require('lv-utils').define_augroups({
_dashboard = {
-- seems to be nobuflisted that makes my stuff disapear will do more testing
{
'FileType', 'dashboard',
'setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= '
}, {
'FileType', 'dashboard',
'set showtabline=0 | autocmd BufLeave <buffer> set showtabline=2'
}, {'FileType', 'dashboard', 'nnoremap <silent> <buffer> q :q<CR>'}
}
})
require("lv-utils").define_augroups {
_dashboard = {
-- seems to be nobuflisted that makes my stuff disapear will do more testing
{
"FileType",
"dashboard",
"setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ",
},
{
"FileType",
"dashboard",
"set showtabline=0 | autocmd BufLeave <buffer> set showtabline=2",
},
{ "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
},
}
return M

View file

@ -1,7 +1,7 @@
local M = {}
M.config = function()
vim.cmd [[
vim.cmd [[
nmap <C-a> <Plug>(dial-increment)
nmap <C-x> <Plug>(dial-decrement)
vmap <C-a> <Plug>(dial-increment)
@ -10,13 +10,13 @@ vmap g<C-a> <Plug>(dial-increment-additional)
vmap g<C-x> <Plug>(dial-decrement-additional)
]]
local dial = require("dial")
local dial = require "dial"
dial.augends["custom#boolean"] = dial.common.enum_cyclic {
name = "boolean",
strlist = {"true", "false"}
}
table.insert(dial.config.searchlist.normal, "custom#boolean")
dial.augends["custom#boolean"] = dial.common.enum_cyclic {
name = "boolean",
strlist = { "true", "false" },
}
table.insert(dial.config.searchlist.normal, "custom#boolean")
end
return M

View file

@ -2,28 +2,28 @@
-- return
-- end
local gl = require('galaxyline')
local gl = require "galaxyline"
-- get my theme in galaxyline repo
-- local colors = require('galaxyline.theme').default
local colors = {
bg = '#2E2E2E',
-- bg = '#292D38',
yellow = '#DCDCAA',
dark_yellow = '#D7BA7D',
cyan = '#4EC9B0',
green = '#608B4E',
light_green = '#B5CEA8',
string_orange = '#CE9178',
orange = '#FF8800',
purple = '#C586C0',
magenta = '#D16D9E',
grey = '#858585',
blue = '#569CD6',
vivid_blue = '#4FC1FF',
light_blue = '#9CDCFE',
red = '#D16969',
error_red = '#F44747',
info_yellow = '#FFCC66'
bg = "#2E2E2E",
-- bg = '#292D38',
yellow = "#DCDCAA",
dark_yellow = "#D7BA7D",
cyan = "#4EC9B0",
green = "#608B4E",
light_green = "#B5CEA8",
string_orange = "#CE9178",
orange = "#FF8800",
purple = "#C586C0",
magenta = "#D16D9E",
grey = "#858585",
blue = "#569CD6",
vivid_blue = "#4FC1FF",
light_blue = "#9CDCFE",
red = "#D16969",
error_red = "#F44747",
info_yellow = "#FFCC66",
}
-- galaxyline themes for Gruvbox and NVCode.
@ -71,259 +71,263 @@ local colors = {
-- info_yellow = '#FFCC66'
-- }
local condition = require('galaxyline.condition')
local condition = require "galaxyline.condition"
local gls = gl.section
gl.short_line_list = {'NvimTree', 'vista', 'dbui', 'packer'}
gl.short_line_list = { "NvimTree", "vista", "dbui", "packer" }
table.insert(gls.left, {
ViMode = {
provider = function()
-- auto change color according the vim mode
local mode_color = {
n = colors.blue,
i = colors.green,
v = colors.purple,
[''] = colors.purple,
V = colors.purple,
c = colors.magenta,
no = colors.blue,
s = colors.orange,
S = colors.orange,
[''] = colors.orange,
ic = colors.yellow,
R = colors.red,
Rv = colors.red,
cv = colors.blue,
ce = colors.blue,
r = colors.cyan,
rm = colors.cyan,
['r?'] = colors.cyan,
['!'] = colors.blue,
t = colors.blue
}
vim.api.nvim_command('hi GalaxyViMode guifg=' .. mode_color[vim.fn.mode()])
return ''
end,
-- highlight = 'TabLineSel'
-- highlight = {colors.red, colors.bg}
}
ViMode = {
provider = function()
-- auto change color according the vim mode
local mode_color = {
n = colors.blue,
i = colors.green,
v = colors.purple,
[""] = colors.purple,
V = colors.purple,
c = colors.magenta,
no = colors.blue,
s = colors.orange,
S = colors.orange,
[""] = colors.orange,
ic = colors.yellow,
R = colors.red,
Rv = colors.red,
cv = colors.blue,
ce = colors.blue,
r = colors.cyan,
rm = colors.cyan,
["r?"] = colors.cyan,
["!"] = colors.blue,
t = colors.blue,
}
vim.api.nvim_command("hi GalaxyViMode guifg=" .. mode_color[vim.fn.mode()])
return ""
end,
-- highlight = 'TabLineSel'
-- highlight = {colors.red, colors.bg}
},
})
-- print(vim.fn.getbufvar(0, 'ts'))
vim.fn.getbufvar(0, 'ts')
vim.fn.getbufvar(0, "ts")
table.insert(gls.left, {
GitIcon = {
provider = function()
return ''
end,
condition = condition.check_git_workspace,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineGit'
}
GitIcon = {
provider = function()
return ""
end,
condition = condition.check_git_workspace,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineGit",
},
})
table.insert(gls.left, {
GitBranch = {
provider = 'GitBranch',
condition = condition.check_git_workspace,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
GitBranch = {
provider = "GitBranch",
condition = condition.check_git_workspace,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.left, {
DiffAdd = {
provider = 'DiffAdd',
condition = condition.hide_in_width,
icon = '',
highlight = 'StatusLineGitAdd'
}
DiffAdd = {
provider = "DiffAdd",
condition = condition.hide_in_width,
icon = "",
highlight = "StatusLineGitAdd",
},
})
table.insert(gls.left, {
DiffModified = {
provider = 'DiffModified',
condition = condition.hide_in_width,
icon = '',
highlight = 'StatusLineGitChange'
}
DiffModified = {
provider = "DiffModified",
condition = condition.hide_in_width,
icon = "",
highlight = "StatusLineGitChange",
},
})
table.insert(gls.left, {
DiffRemove = {
provider = 'DiffRemove',
condition = condition.hide_in_width,
icon = '',
highlight = 'StatusLineGitDelete'
}
DiffRemove = {
provider = "DiffRemove",
condition = condition.hide_in_width,
icon = "",
highlight = "StatusLineGitDelete",
},
})
table.insert(gls.right, {
DiagnosticError = {provider = 'DiagnosticError', icon = '',
highlight = 'StatusLineLspDiagnosticsError'
}
DiagnosticError = {
provider = "DiagnosticError",
icon = "",
highlight = "StatusLineLspDiagnosticsError",
},
})
table.insert(gls.right, {DiagnosticWarn = {provider = 'DiagnosticWarn', icon = '',
highlight = 'StatusLineLspDiagnosticsWarning'
}})
table.insert(gls.right, {DiagnosticInfo = {provider = 'DiagnosticInfo', icon = '',
highlight = 'StatusLineLspDiagnosticsInformation'
}})
table.insert(gls.right, {
DiagnosticHint = {provider = 'DiagnosticHint', icon = '',
DiagnosticWarn = {
provider = "DiagnosticWarn",
icon = "",
highlight = 'StatusLineLspDiagnosticsHint'
}
highlight = "StatusLineLspDiagnosticsWarning",
},
})
table.insert(gls.right, {
TreesitterIcon = {
provider = function()
if next(vim.treesitter.highlighter.active) ~= nil then return '' end
return ''
end,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineTreeSitter'
}
DiagnosticInfo = {
provider = "DiagnosticInfo",
icon = "",
highlight = "StatusLineLspDiagnosticsInformation",
},
})
local get_lsp_client = function (msg)
msg = msg or "No Active LSP Client"
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
local lsps = ""
for _,client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~=1 then
-- print(client.name)
if lsps == "" then
-- print("first", lsps)
lsps = client.name
else
lsps = lsps .. ", " .. client.name
-- print("more", lsps)
end
end
end
if lsps == "" then
return msg
else
return lsps
table.insert(gls.right, {
DiagnosticHint = {
provider = "DiagnosticHint",
icon = "",
highlight = "StatusLineLspDiagnosticsHint",
},
})
table.insert(gls.right, {
TreesitterIcon = {
provider = function()
if next(vim.treesitter.highlighter.active) ~= nil then
return ""
end
return ""
end,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineTreeSitter",
},
})
local get_lsp_client = function(msg)
msg = msg or "No Active LSP Client"
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
local lsps = ""
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= 1 then
-- print(client.name)
if lsps == "" then
-- print("first", lsps)
lsps = client.name
else
lsps = lsps .. ", " .. client.name
-- print("more", lsps)
end
end
end
if lsps == "" then
return msg
else
return lsps
end
end
table.insert(gls.right, {
ShowLspClient = {
provider = get_lsp_client,
condition = function()
local tbl = {['dashboard'] = true, [' '] = true}
if tbl[vim.bo.filetype] then return false end
return true
end,
icon = '',
highlight = 'StatusLineNC'
}
ShowLspClient = {
provider = get_lsp_client,
condition = function()
local tbl = { ["dashboard"] = true, [" "] = true }
if tbl[vim.bo.filetype] then
return false
end
return true
end,
icon = "",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
LineInfo = {
provider = 'LineColumn',
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
LineInfo = {
provider = "LineColumn",
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
PerCent = {
provider = 'LinePercent',
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
PerCent = {
provider = "LinePercent",
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
Tabstop = {
provider = function()
return "Spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " "
end,
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
Tabstop = {
provider = function()
return "Spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " "
end,
condition = condition.hide_in_width,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
BufferType = {
provider = 'FileTypeName',
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
BufferType = {
provider = "FileTypeName",
condition = condition.hide_in_width,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
FileEncode = {
provider = 'FileEncode',
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
FileEncode = {
provider = "FileEncode",
condition = condition.hide_in_width,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.right, {
Space = {
provider = function()
return ' '
end,
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
Space = {
provider = function()
return " "
end,
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.short_line_left, {
BufferType = {
provider = 'FileTypeName',
separator = ' ',
separator_highlight = 'StatusLineSeparator',
highlight = 'StatusLineNC'
}
BufferType = {
provider = "FileTypeName",
separator = " ",
separator_highlight = "StatusLineSeparator",
highlight = "StatusLineNC",
},
})
table.insert(gls.short_line_left, {
SFileName = {provider = 'SFileName', condition = condition.buffer_not_empty,
SFileName = {
provider = "SFileName",
condition = condition.buffer_not_empty,
highlight = 'StatusLineNC'
}
highlight = "StatusLineNC",
},
})
--table.insert(gls.short_line_right[1] = {BufferIcon = {provider = 'BufferIcon', highlight = {colors.grey, colors.bg}}})

View file

@ -1,2 +1,2 @@
vim.cmd('highlight default link gitblame SpecialComment')
vim.cmd "highlight default link gitblame SpecialComment"
vim.g.gitblame_enabled = 0

View file

@ -1,53 +1,53 @@
local M = {}
M.config = function()
require('gitsigns').setup {
signs = {
-- TODO add hl to colorscheme
add = {
hl = 'GitSignsAdd',
text = '',
numhl = 'GitSignsAddNr',
linehl = 'GitSignsAddLn'
},
change = {
hl = 'GitSignsChange',
text = '',
numhl = 'GitSignsChangeNr',
linehl = 'GitSignsChangeLn'
},
delete = {
hl = 'GitSignsDelete',
text = '',
numhl = 'GitSignsDeleteNr',
linehl = 'GitSignsDeleteLn'
},
topdelete = {
hl = 'GitSignsDelete',
text = '',
numhl = 'GitSignsDeleteNr',
linehl = 'GitSignsDeleteLn'
},
changedelete = {
hl = 'GitSignsChange',
text = '',
numhl = 'GitSignsChangeNr',
linehl = 'GitSignsChangeLn'
}
},
numhl = false,
linehl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true
},
watch_index = {interval = 1000},
sign_priority = 6,
update_debounce = 200,
status_formatter = nil, -- Use default
use_decoration_api = false
}
require("gitsigns").setup {
signs = {
-- TODO add hl to colorscheme
add = {
hl = "GitSignsAdd",
text = "",
numhl = "GitSignsAddNr",
linehl = "GitSignsAddLn",
},
change = {
hl = "GitSignsChange",
text = "",
numhl = "GitSignsChangeNr",
linehl = "GitSignsChangeLn",
},
delete = {
hl = "GitSignsDelete",
text = "",
numhl = "GitSignsDeleteNr",
linehl = "GitSignsDeleteLn",
},
topdelete = {
hl = "GitSignsDelete",
text = "",
numhl = "GitSignsDeleteNr",
linehl = "GitSignsDeleteLn",
},
changedelete = {
hl = "GitSignsChange",
text = "",
numhl = "GitSignsChangeNr",
linehl = "GitSignsChangeLn",
},
},
numhl = false,
linehl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true,
},
watch_index = { interval = 1000 },
sign_priority = 6,
update_debounce = 200,
status_formatter = nil, -- Use default
use_decoration_api = false,
}
end
return M

View file

@ -1,9 +1,9 @@
local M = {}
M.config = function()
require('hop').setup()
vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true})
vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true})
require("hop").setup()
vim.api.nvim_set_keymap("n", "s", ":HopChar2<cr>", { silent = true })
vim.api.nvim_set_keymap("n", "S", ":HopWord<cr>", { silent = true })
end
return M

View file

@ -1,5 +1,5 @@
require("lsp-rooter").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}

View file

@ -1,7 +1,7 @@
-- 1. get the config for this server from nvim-lspconfig and adjust the cmd path.
-- relative paths are allowed, lspinstall automatically adjusts the cmd and cmd_cwd for us!
local config = require'lspconfig'.jdtls.document_config
require'lspconfig/configs'.jdtls = nil -- important, unset the loaded config again
local config = require("lspconfig").jdtls.document_config
require("lspconfig/configs").jdtls = nil -- important, unset the loaded config again
-- config.default_config.cmd[1] = "./node_modules/.bin/bash-language-server"
-- 2. extend the config with an install_script and (optionally) uninstall_script
@ -24,4 +24,4 @@ require'lspconfig/configs'.jdtls = nil -- important, unset the loaded config aga
-- uninstall_script = nil -- can be omitted
-- })
require'lspinstall'.setup()
require("lspinstall").setup()

View file

@ -1,8 +1,7 @@
local M = {}
M.config = function()
vim.g.matchup_matchparen_offscreen = {method = 'popup'}
vim.g.matchup_matchparen_offscreen = { method = "popup" }
end
return M

View file

@ -5,78 +5,77 @@
local M = {}
M.config = function()
local g = vim.g
local g = vim.g
vim.o.termguicolors = true
vim.o.termguicolors = true
g.nvim_tree_side = "left"
g.nvim_tree_width = 30
g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
g.nvim_tree_auto_open = 1
g.nvim_tree_auto_close = 0
g.nvim_tree_quit_on_open = 0
g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_root_folder_modifier = ":t"
g.nvim_tree_tab_open = 0
g.nvim_tree_allow_resize = 1
g.nvim_tree_lsp_diagnostics = 1
g.nvim_tree_auto_ignore_ft = {'startify', 'dashboard'}
g.nvim_tree_side = "left"
g.nvim_tree_width = 30
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
g.nvim_tree_auto_open = 1
g.nvim_tree_auto_close = 0
g.nvim_tree_quit_on_open = 0
g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_root_folder_modifier = ":t"
g.nvim_tree_tab_open = 0
g.nvim_tree_allow_resize = 1
g.nvim_tree_lsp_diagnostics = 1
g.nvim_tree_auto_ignore_ft = { "startify", "dashboard" }
g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1,
folder_arrows = 1
}
g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1,
folder_arrows = 1,
}
vim.g.nvim_tree_icons = {
default = '',
symlink = '',
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "",
deleted = "",
untracked = "U",
ignored = ""
},
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
symlink = ""
}
}
local tree_cb = require'nvim-tree.config'.nvim_tree_callback
vim.g.nvim_tree_icons = {
default = "",
symlink = "",
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "",
deleted = "",
untracked = "U",
ignored = "",
},
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
},
}
local tree_cb = require("nvim-tree.config").nvim_tree_callback
vim.g.nvim_tree_bindings = {
{key = {"l", "<CR>", "o"}, cb = tree_cb("edit")},
{key = "h", cb = tree_cb("close_node")},
{key = "v", cb = tree_cb("vsplit")}
}
vim.g.nvim_tree_bindings = {
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
{ key = "h", cb = tree_cb "close_node" },
{ key = "v", cb = tree_cb "vsplit" },
}
end
local view = require 'nvim-tree.view'
local view = require "nvim-tree.view"
M.toggle_tree = function()
if view.win_open() then
require'nvim-tree'.close()
if package.loaded['bufferline.state'] then
require'bufferline.state'.set_offset(0)
end
else
if package.loaded['bufferline.state'] then
-- require'bufferline.state'.set_offset(31, 'File Explorer')
require'bufferline.state'.set_offset(31, '')
end
require'nvim-tree'.find_file(true)
if view.win_open() then
require("nvim-tree").close()
if package.loaded["bufferline.state"] then
require("bufferline.state").set_offset(0)
end
else
if package.loaded["bufferline.state"] then
-- require'bufferline.state'.set_offset(31, 'File Explorer')
require("bufferline.state").set_offset(31, "")
end
require("nvim-tree").find_file(true)
end
end
return M

View file

@ -1,4 +1,4 @@
-- Trigger a highlight in the appropriate direction when pressing these keys:
-- vim.cmd('let g:qs_highlight_on_keys = [\'f\', \'F\', \'t\', \'T\']')
vim.g.qs_highlight_on_keys = {'f', 'F', 't', 'T'}
vim.g.qs_max_chars=150
vim.g.qs_highlight_on_keys = { "f", "F", "t", "T" }
vim.g.qs_max_chars = 150

View file

@ -3,4 +3,4 @@
vim.g.rnvimr_draw_border = 1
vim.g.rnvimr_pick_enable = 1
vim.g.rnvimr_bw_enable = 1
vim.api.nvim_set_keymap('n', '-', ':RnvimrToggle<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "-", ":RnvimrToggle<CR>", { noremap = true, silent = true })

View file

@ -1,14 +1,14 @@
local M = {}
M.config = function()
local snap = require "snap"
local layout = snap.get"layout".bottom
local file = snap.config.file:with {consumer = "fzy", layout = layout}
local vimgrep = snap.config.vimgrep:with {layout = layout}
snap.register.command("find_files", file {producer = "ripgrep.file"})
snap.register.command("buffers", file {producer = "vim.buffer"})
snap.register.command("oldfiles", file {producer = "vim.oldfile"})
snap.register.command("live_grep", vimgrep {})
local snap = require "snap"
local layout = snap.get("layout").bottom
local file = snap.config.file:with { consumer = "fzy", layout = layout }
local vimgrep = snap.config.vimgrep:with { layout = layout }
snap.register.command("find_files", file { producer = "ripgrep.file" })
snap.register.command("buffers", file { producer = "vim.buffer" })
snap.register.command("oldfiles", file { producer = "vim.oldfile" })
snap.register.command("live_grep", vimgrep {})
end
return M

View file

@ -1,51 +1,50 @@
require('spectre').setup({
mapping={
['toggle_line'] = {
map = "dd",
cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
desc = "toggle current item"
require("spectre").setup {
mapping = {
["toggle_line"] = {
map = "dd",
cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
desc = "toggle current item",
},
['enter_file'] = {
map = "<cr>",
cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>",
desc = "goto current file"
["enter_file"] = {
map = "<cr>",
cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>",
desc = "goto current file",
},
['send_to_qf'] = {
map = "<Blash>q",
cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
desc = "send all item to quickfix"
["send_to_qf"] = {
map = "<Blash>q",
cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
desc = "send all item to quickfix",
},
['replace_cmd'] = {
map = "<Bslash>c",
cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>",
desc = "input replace vim command"
["replace_cmd"] = {
map = "<Bslash>c",
cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>",
desc = "input replace vim command",
},
['show_option_menu'] = {
map = "<Bslash>o",
cmd = "<cmd>lua require('spectre').show_options()<CR>",
desc = "show option"
["show_option_menu"] = {
map = "<Bslash>o",
cmd = "<cmd>lua require('spectre').show_options()<CR>",
desc = "show option",
},
['run_replace'] = {
map = "<Bslash>R",
cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>",
desc = "replace all"
["run_replace"] = {
map = "<Bslash>R",
cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>",
desc = "replace all",
},
['change_view_mode'] = {
map = "<Bslash>v",
cmd = "<cmd>lua require('spectre').change_view()<CR>",
desc = "change result view mode"
["change_view_mode"] = {
map = "<Bslash>v",
cmd = "<cmd>lua require('spectre').change_view()<CR>",
desc = "change result view mode",
},
['toggle_ignore_case'] = {
["toggle_ignore_case"] = {
map = "ti",
cmd = "<cmd>lua require('spectre').change_options('ignore-case')<CR>",
desc = "toggle ignore case"
desc = "toggle ignore case",
},
['toggle_ignore_hidden'] = {
["toggle_ignore_hidden"] = {
map = "th",
cmd = "<cmd>lua require('spectre').change_options('hidden')<CR>",
desc = "toggle search hidden"
desc = "toggle search hidden",
},
-- you can put your mapping here it only use normal mode
}
})
},
}

View file

@ -1,15 +1,15 @@
vim.g.symbols_outline = {
highlight_hovered_item = true,
show_guides = true,
auto_preview = true,
position = 'right',
keymaps = {
close = "<Esc>",
goto_location = "<Cr>",
focus_location = "o",
hover_symbol = "<C-space>",
rename_symbol = "r",
code_actions = "a",
},
lsp_blacklist = {},
highlight_hovered_item = true,
show_guides = true,
auto_preview = true,
position = "right",
keymaps = {
close = "<Esc>",
goto_location = "<Cr>",
focus_location = "o",
hover_symbol = "<C-space>",
rename_symbol = "r",
code_actions = "a",
},
lsp_blacklist = {},
}

View file

@ -1,82 +1,86 @@
local actions = require('telescope.actions')
local actions = require "telescope.actions"
-- if O.plugin.trouble.active then
-- local trouble = require("trouble.providers.telescope")
-- end
-- Global remapping
------------------------------
-- '--color=never',
require('telescope').setup {
defaults = {
find_command = {
'rg', '--no-heading', '--with-filename', '--line-number',
'--column', '--smart-case'
},
prompt_prefix = "",
selection_caret = "",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_config = {
width = 0.75,
prompt_position = "bottom",
preview_cutoff = 120,
horizontal = {mirror = false},
vertical = {mirror = false}
},
file_sorter = require'telescope.sorters'.get_fzy_sorter,
file_ignore_patterns = {},
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
shorten_path = true,
winblend = 0,
border = {},
borderchars = {'', '', '', '', '', '', '', ''},
color_devicons = true,
use_less = true,
set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil,
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker,
mappings = {
i = {
["<C-c>"] = actions.close,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
-- ["<c-t>"] = trouble.open_with_trouble,
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
-- To disable a keymap, put [map] = false
-- So, to not map "<C-n>", just put
-- ["<c-x>"] = false,
-- ["<esc>"] = actions.close,
-- Otherwise, just set the mapping to the function that you want it to be.
-- ["<C-i>"] = actions.select_horizontal,
-- Add up multiple actions
["<CR>"] = actions.select_default + actions.center
-- You can perform as many actions in a row as you like
-- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action,
},
n = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
-- ["<c-t>"] = trouble.open_with_trouble,
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist
-- ["<C-i>"] = my_cool_custom_action,
}
}
require("telescope").setup {
defaults = {
find_command = {
"rg",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
extensions = {
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true
}
}
prompt_prefix = "",
selection_caret = "",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_config = {
width = 0.75,
prompt_position = "bottom",
preview_cutoff = 120,
horizontal = { mirror = false },
vertical = { mirror = false },
},
file_sorter = require("telescope.sorters").get_fzy_sorter,
file_ignore_patterns = {},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
shorten_path = true,
winblend = 0,
border = {},
borderchars = { "", "", "", "", "", "", "", "" },
color_devicons = true,
use_less = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
mappings = {
i = {
["<C-c>"] = actions.close,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
-- ["<c-t>"] = trouble.open_with_trouble,
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
-- To disable a keymap, put [map] = false
-- So, to not map "<C-n>", just put
-- ["<c-x>"] = false,
-- ["<esc>"] = actions.close,
-- Otherwise, just set the mapping to the function that you want it to be.
-- ["<C-i>"] = actions.select_horizontal,
-- Add up multiple actions
["<CR>"] = actions.select_default + actions.center,
-- You can perform as many actions in a row as you like
-- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action,
},
n = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
-- ["<c-t>"] = trouble.open_with_trouble,
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
-- ["<C-i>"] = my_cool_custom_action,
},
},
},
extensions = {
fzy_native = {
override_generic_sorter = false,
override_file_sorter = true,
},
},
}
-- require'telescope'.load_extension('project')

View file

@ -1,371 +1,370 @@
local lush = require('lush')
local lush = require "lush"
local hsl = lush.hsl
local theme = lush(function()
local c = {
bg = hsl("#212121"),
bg1 = hsl("#2a2a2a"),
-- bg2 = hsl("#3a3a3a"),
bg2 = hsl("#383d45"),
local c = {
bg = hsl "#212121",
bg1 = hsl "#2a2a2a",
-- bg2 = hsl("#3a3a3a"),
bg2 = hsl "#383d45",
white = hsl("#c8c9d1"),
white = hsl "#c8c9d1",
gray = hsl("#858585"),
light_gray = hsl("#c8c9c1"),
gray = hsl "#858585",
light_gray = hsl "#c8c9c1",
error_red = hsl("#F44747"),
warning_orange = hsl("#ff8800"),
info_yellow = hsl("#ffcc66"),
hint_blue = hsl("#4fc1ff"),
error_red = hsl "#F44747",
warning_orange = hsl "#ff8800",
info_yellow = hsl "#ffcc66",
hint_blue = hsl "#4fc1ff",
red = hsl("#b04b57"),
red = hsl "#b04b57",
blue = hsl("#5486c0"),
gray_blue = hsl("#66899d"),
blue = hsl "#5486c0",
gray_blue = hsl "#66899d",
-- yellow = hsl("#ffcb6b"),
yellow = hsl("#eeba5a"),
-- yellow = hsl("#ffcb6b"),
yellow = hsl "#eeba5a",
-- orange = hsl("#c98a75"),
orange = hsl("#c6735a"),
-- orange = hsl("#c98a75"),
orange = hsl "#c6735a",
green = hsl("#87b379"),
light_green = hsl("#b2d77c"),
green = hsl "#87b379",
light_green = hsl "#b2d77c",
-- aqua = hsl("#46b1d0"),
aqua = hsl("#65a7c5"),
-- aqua = hsl("#46b1d0"),
aqua = hsl "#65a7c5",
purple = hsl("#bf83c1"),
pale_purple = hsl("#7199ee"),
purple = hsl "#bf83c1",
pale_purple = hsl "#7199ee",
sign_add = hsl("#587C0C"),
sign_change = hsl("#0C7D9D"),
sign_delete = hsl("#94151B"),
sign_add = hsl "#587C0C",
sign_change = hsl "#0C7D9D",
sign_delete = hsl "#94151B",
test = hsl("#ff00ff")
}
return {
Normal {bg = c.bg, fg = c.white, gui = "NONE"}, -- used for the columns set with 'colorcolumn'
SignColumn {Normal},
ModeMsg {Normal},
MsgArea {Normal},
MsgSeparator {Normal},
SpellBad {bg = "NONE", fg = c.white, gui = "underline", sp = c.red},
SpellCap {bg = "NONE", fg = c.white, gui = "underline", sp = c.yellow},
SpellLocal {bg = "NONE", fg = c.white, gui = "underline", sp = c.green},
SpellRare {bg = "NONE", fg = c.white, gui = "underline", sp = c.blue},
NormalNC {Normal},
Pmenu {bg = c.bg2, fg = c.white, gui = "NONE"},
PmenuSel {bg = c.gray_blue, fg = c.bg1.da(5), gui = "NONE"},
WildMenu {PmenuSel}, -- Non Defaults
CursorLineNr {bg = "NONE", fg = c.light_gray, gui = "bold"},
Comment {bg = "NONE", fg = c.gray, gui = "italic"}, -- any comment
Folded {bg = c.bg1, fg = c.gray, gui = "NONE"},
FoldColumn {Normal, fg = c.gray, gui = "NONE"},
LineNr {bg = "NONE", fg = c.gray, gui = "NONE"},
FloatBorder {bg = c.bg1, fg = c.gray, gui = "NONE"},
Whitespace {bg = "NONE", fg = c.gray.da(35), gui = "NONE"},
VertSplit {bg = "NONE", fg = c.bg2, gui = "NONE"},
CursorLine {bg = c.bg1, fg = "NONE", gui = "NONE"},
CursorColumn {CursorLine},
ColorColumn {CursorLine},
NormalFloat {bg = c.bg2.da(30), fg = "NONE", gui = "NONE"},
Visual {bg = c.bg2.da(25), fg = "NONE", gui = "NONE"},
VisualNOS {Visual}, WarningMsg {bg = "NONE", fg = c.red, gui = "NONE"},
DiffText {bg = "NONE", fg = "NONE", gui = "NONE"},
DiffAdd {bg = c.sign_add, fg = "NONE", gui = "NONE"},
DiffChange {bg = c.sign_change, fg = "NONE", gui = "NONE"},
DiffDelete {bg = c.sign_delete, fg = "NONE", gui = "NONE"},
QuickFixLine {CursorLine},
PmenuSbar {bg = c.bg2.li(15), fg = "NONE", gui = "NONE"},
PmenuThumb {bg = c.white, fg = "NONE", gui = "NONE"},
MatchParen {CursorLine, fg = "NONE", gui = "NONE"},
Cursor {fg = "NONE", bg = "NONE", gui = "reverse"},
lCursor {Cursor},
CursorIM {Cursor},
TermCursor {Cursor}, TermCursorNC {Cursor},
Conceal {bg = "NONE", fg = c.blue, gui = "NONE"},
Directory {bg = "NONE", fg = c.blue, gui = "NONE"},
SpecialKey {bg = "NONE", fg = c.blue, gui = "bold"},
Title {bg = "NONE", fg = c.blue, gui = "bold"},
ErrorMsg {bg = "NONE", fg = c.error_red, gui = "NONE"},
Search {bg = c.gray_blue, fg = c.white},
IncSearch {Search},
Substitute {Search},
MoreMsg {bg = "NONE", fg = c.aqua, gui = "NONE"},
Question {MoreMsg},
EndOfBuffer {bg = "NONE", fg = c.bg, gui = "NONE"},
NonText {EndOfBuffer},
test = hsl "#ff00ff",
}
return {
Normal { bg = c.bg, fg = c.white, gui = "NONE" }, -- used for the columns set with 'colorcolumn'
SignColumn { Normal },
ModeMsg { Normal },
MsgArea { Normal },
MsgSeparator { Normal },
SpellBad { bg = "NONE", fg = c.white, gui = "underline", sp = c.red },
SpellCap { bg = "NONE", fg = c.white, gui = "underline", sp = c.yellow },
SpellLocal { bg = "NONE", fg = c.white, gui = "underline", sp = c.green },
SpellRare { bg = "NONE", fg = c.white, gui = "underline", sp = c.blue },
NormalNC { Normal },
Pmenu { bg = c.bg2, fg = c.white, gui = "NONE" },
PmenuSel { bg = c.gray_blue, fg = c.bg1.da(5), gui = "NONE" },
WildMenu { PmenuSel }, -- Non Defaults
CursorLineNr { bg = "NONE", fg = c.light_gray, gui = "bold" },
Comment { bg = "NONE", fg = c.gray, gui = "italic" }, -- any comment
Folded { bg = c.bg1, fg = c.gray, gui = "NONE" },
FoldColumn { Normal, fg = c.gray, gui = "NONE" },
LineNr { bg = "NONE", fg = c.gray, gui = "NONE" },
FloatBorder { bg = c.bg1, fg = c.gray, gui = "NONE" },
Whitespace { bg = "NONE", fg = c.gray.da(35), gui = "NONE" },
VertSplit { bg = "NONE", fg = c.bg2, gui = "NONE" },
CursorLine { bg = c.bg1, fg = "NONE", gui = "NONE" },
CursorColumn { CursorLine },
ColorColumn { CursorLine },
NormalFloat { bg = c.bg2.da(30), fg = "NONE", gui = "NONE" },
Visual { bg = c.bg2.da(25), fg = "NONE", gui = "NONE" },
VisualNOS { Visual },
WarningMsg { bg = "NONE", fg = c.red, gui = "NONE" },
DiffText { bg = "NONE", fg = "NONE", gui = "NONE" },
DiffAdd { bg = c.sign_add, fg = "NONE", gui = "NONE" },
DiffChange { bg = c.sign_change, fg = "NONE", gui = "NONE" },
DiffDelete { bg = c.sign_delete, fg = "NONE", gui = "NONE" },
QuickFixLine { CursorLine },
PmenuSbar { bg = c.bg2.li(15), fg = "NONE", gui = "NONE" },
PmenuThumb { bg = c.white, fg = "NONE", gui = "NONE" },
MatchParen { CursorLine, fg = "NONE", gui = "NONE" },
Cursor { fg = "NONE", bg = "NONE", gui = "reverse" },
lCursor { Cursor },
CursorIM { Cursor },
TermCursor { Cursor },
TermCursorNC { Cursor },
Conceal { bg = "NONE", fg = c.blue, gui = "NONE" },
Directory { bg = "NONE", fg = c.blue, gui = "NONE" },
SpecialKey { bg = "NONE", fg = c.blue, gui = "bold" },
Title { bg = "NONE", fg = c.blue, gui = "bold" },
ErrorMsg { bg = "NONE", fg = c.error_red, gui = "NONE" },
Search { bg = c.gray_blue, fg = c.white },
IncSearch { Search },
Substitute { Search },
MoreMsg { bg = "NONE", fg = c.aqua, gui = "NONE" },
Question { MoreMsg },
EndOfBuffer { bg = "NONE", fg = c.bg, gui = "NONE" },
NonText { EndOfBuffer },
String {fg = c.green},
Character {fg = c.light_green},
Constant {fg = c.orange},
Number {fg = c.red},
Boolean {fg = c.red},
Float {fg = c.red},
String { fg = c.green },
Character { fg = c.light_green },
Constant { fg = c.orange },
Number { fg = c.red },
Boolean { fg = c.red },
Float { fg = c.red },
Identifier {fg = c.white},
Function {fg = c.yellow},
Operator {fg = c.gray_blue},
Identifier { fg = c.white },
Function { fg = c.yellow },
Operator { fg = c.gray_blue },
Type {fg = c.purple},
StorageClass {Type},
Structure {Type},
Typedef {Type},
Type { fg = c.purple },
StorageClass { Type },
Structure { Type },
Typedef { Type },
Keyword {fg = c.blue},
Statement {Keyword },
Conditional {Keyword},
Repeat {Keyword},
Label {Keyword},
Exception {Keyword},
Keyword { fg = c.blue },
Statement { Keyword },
Conditional { Keyword },
Repeat { Keyword },
Label { Keyword },
Exception { Keyword },
Include {Keyword},
PreProc {fg = c.aqua},
Define {PreProc},
Macro {PreProc},
PreCondit {PreProc},
Include { Keyword },
PreProc { fg = c.aqua },
Define { PreProc },
Macro { PreProc },
PreCondit { PreProc },
Special { fg = c.orange },
SpecialChar { Character },
Tag { fg = c.pale_purple },
Debug { fg = c.red },
Delimiter { fg = c.white.da(25) },
SpecialComment { fg = c.gray },
Underlined { fg = "NONE", gui = "underline" },
Bold { fg = "NONE", gui = "bold" },
Italic { fg = "NONE", gui = "italic" },
Special {fg = c.orange},
SpecialChar {Character},
Tag {fg = c.pale_purple},
Debug {fg = c.red},
Delimiter {fg = c.white.da(25)},
SpecialComment {fg = c.gray},
Underlined {fg = "NONE", gui = "underline"},
Bold {fg = "NONE", gui = "bold"},
Italic {fg = "NONE", gui = "italic"},
-- Todo
-- ("Ignore", below, may be invisible...)
Ignore { fg = c.white },
Todo { bg = "NONE", fg = c.red, gui = "bold" },
Error { fg = c.error_red },
-- Todo
-- ("Ignore", below, may be invisible...)
Ignore {fg = c.white},
Todo {bg = "NONE", fg = c.red, gui = "bold"},
Error {fg = c.error_red},
-- Treesitter
TSComment { Comment }, -- comment blocks.
luaTSConstructor { bg = "NONE", fg = c.white.da(25) }, -- override Lua curly braces
TSAnnotation { bg = "NONE", fg = c.aqua }, -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
TSAttribute { bg = "NONE", fg = c.aqua }, -- (unstable) TODO: docs
TSConstructor { Type }, -- For constructor calls and definitions: `{ }` in Lua, and Java constructors.
TSType { Type }, -- types.
TSTypeBuiltin { Type }, -- builtin types.
TSConditional { Conditional }, -- keywords related to conditionnals.
TSException { Exception }, -- exception related keywords.
TSInclude { Include }, -- includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
TSKeyword { Keyword }, -- keywords that don't fall in previous categories.
TSKeywordFunction { Keyword }, -- keywords used to define a fuction.
TSLabel { Label }, -- labels: `label:` in C and `:label:` in Lua.
TSNamespace { bg = "NONE", fg = c.blue }, -- For identifiers referring to modules and namespaces.
TSRepeat { Repeat }, -- keywords related to loops.
TSConstant { Constant }, -- constants
TSConstBuiltin { Constant }, -- constant that are built in the language: `nil` in Lua.
TSFloat { Float }, -- floats.
TSNumber { Number }, -- all numbers
TSBoolean { Boolean }, -- booleans.
TSCharacter { Character }, -- characters.
TSError { bg = "NONE", fg = "NONE" }, -- For syntax/parser errors.
TSFunction { Function }, -- function (calls and definitions).
TSFuncBuiltin { Function }, -- builtin functions: `table.insert` in Lua.
TSMethod { Function }, -- method calls and definitions.
TSConstMacro { Macro }, -- constants that are defined by macros: `NULL` in C.
TSFuncMacro { Macro }, -- macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
TSVariableBuiltin { bg = "NONE", fg = c.aqua }, -- Variable names that are defined by the languages, like `this` or `self`.
TSProperty { fg = c.aqua },
TSOperator { Operator }, -- any operator: `+`, but also `->` and `*` in C.
TSVariable { bg = "NONE", fg = c.white }, -- Any variable name that does not have another highlight.
TSField { bg = "NONE", fg = c.white }, -- For fields.
TSParameter { TSField }, -- parameters of a function.
TSParameterReference { TSParameter }, -- references to parameters of a function.
TSSymbol { Identifier }, -- identifiers referring to symbols or atoms.
TSText { fg = c.white }, -- strings considered text in a markup language.
TSPunctDelimiter { Delimiter }, -- delimiters ie: `.`
TSTagDelimiter { Delimiter }, -- Tag delimiter like `<` `>` `/`
TSPunctBracket { Delimiter }, -- brackets and parens.
TSPunctSpecial { Delimiter }, -- special punctutation that does not fall in the catagories before.
TSString { String }, -- strings.
TSStringRegex { TSString }, -- regexes.
TSStringEscape { Character }, -- escape characters within a string.
TSWarning { Todo }, -- Variable names that are defined by the languages, like `this` or `self`.
TSTag { Tag }, -- Tags like html tag names.
TSEmphasis { gui = "italic" }, -- text to be represented with emphasis.
TSUnderline { gui = "underline" }, -- text to be represented with an underline.
TSStrike { gui = "strikethrough" }, -- strikethrough text.
TSTitle { Title }, -- Text that is part of a title.
TSLiteral { String }, -- Literal text.
TSURI { fg = c.aqua }, -- Any URI like a link or email.
-- TSNone { }, -- TODO: docs
-- Treesitter
TSComment {Comment}, -- comment blocks.
luaTSConstructor {bg = "NONE", fg = c.white.da(25)}, -- override Lua curly braces
TSAnnotation {bg = "NONE", fg = c.aqua}, -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
TSAttribute {bg = "NONE", fg = c.aqua}, -- (unstable) TODO: docs
TSConstructor {Type}, -- For constructor calls and definitions: `{ }` in Lua, and Java constructors.
TSType {Type}, -- types.
TSTypeBuiltin {Type}, -- builtin types.
TSConditional {Conditional}, -- keywords related to conditionnals.
TSException {Exception}, -- exception related keywords.
TSInclude {Include}, -- includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua.
TSKeyword {Keyword}, -- keywords that don't fall in previous categories.
TSKeywordFunction {Keyword}, -- keywords used to define a fuction.
TSLabel {Label}, -- labels: `label:` in C and `:label:` in Lua.
TSNamespace {bg = "NONE", fg = c.blue}, -- For identifiers referring to modules and namespaces.
TSRepeat {Repeat}, -- keywords related to loops.
TSConstant {Constant}, -- constants
TSConstBuiltin {Constant}, -- constant that are built in the language: `nil` in Lua.
TSFloat {Float}, -- floats.
TSNumber {Number}, -- all numbers
TSBoolean {Boolean}, -- booleans.
TSCharacter {Character}, -- characters.
TSError {bg = "NONE", fg = "NONE"}, -- For syntax/parser errors.
TSFunction {Function}, -- function (calls and definitions).
TSFuncBuiltin {Function}, -- builtin functions: `table.insert` in Lua.
TSMethod {Function}, -- method calls and definitions.
TSConstMacro {Macro}, -- constants that are defined by macros: `NULL` in C.
TSFuncMacro {Macro}, -- macro defined fuctions (calls and definitions): each `macro_rules` in Rust.
TSVariableBuiltin {bg = "NONE", fg = c.aqua}, -- Variable names that are defined by the languages, like `this` or `self`.
TSProperty {fg = c.aqua},
TSOperator {Operator}, -- any operator: `+`, but also `->` and `*` in C.
TSVariable {bg = "NONE", fg = c.white}, -- Any variable name that does not have another highlight.
TSField {bg = "NONE", fg = c.white}, -- For fields.
TSParameter {TSField}, -- parameters of a function.
TSParameterReference {TSParameter}, -- references to parameters of a function.
TSSymbol {Identifier}, -- identifiers referring to symbols or atoms.
TSText {fg = c.white}, -- strings considered text in a markup language.
TSPunctDelimiter {Delimiter}, -- delimiters ie: `.`
TSTagDelimiter {Delimiter}, -- Tag delimiter like `<` `>` `/`
TSPunctBracket {Delimiter}, -- brackets and parens.
TSPunctSpecial {Delimiter}, -- special punctutation that does not fall in the catagories before.
TSString {String}, -- strings.
TSStringRegex {TSString}, -- regexes.
TSStringEscape {Character}, -- escape characters within a string.
TSWarning {Todo}, -- Variable names that are defined by the languages, like `this` or `self`.
TSTag {Tag}, -- Tags like html tag names.
TSEmphasis {gui = "italic"}, -- text to be represented with emphasis.
TSUnderline {gui = "underline"}, -- text to be represented with an underline.
TSStrike {gui = "strikethrough"}, -- strikethrough text.
TSTitle {Title}, -- Text that is part of a title.
TSLiteral {String}, -- Literal text.
TSURI {fg = c.aqua}, -- Any URI like a link or email.
-- TSNone { }, -- TODO: docs
-- These groups are for the native LSP client. Some other LSP clients may
-- use these groups, or use their own. Consult your LSP client's
-- documentation.
-- These groups are for the native LSP client. Some other LSP clients may
-- use these groups, or use their own. Consult your LSP client's
-- documentation.
LspDiagnosticsDefaultError { bg = "NONE", fg = c.error_red, gui = "NONE" },
LspDiagnosticsDefaultWarning { bg = "NONE", fg = c.warning_orange, gui = "NONE" },
LspDiagnosticsDefaultInformation { bg = "NONE", fg = c.info_yellow, gui = "NONE" },
LspDiagnosticsDefaultHint { bg = "NONE", fg = c.hint_blue, gui = "NONE" },
LspDiagnosticsDefaultError {bg = "NONE", fg = c.error_red, gui = "NONE"},
LspDiagnosticsDefaultWarning {bg = "NONE", fg = c.warning_orange, gui = "NONE"},
LspDiagnosticsDefaultInformation {bg = "NONE", fg = c.info_yellow, gui = "NONE"},
LspDiagnosticsDefaultHint {bg = "NONE", fg = c.hint_blue, gui = "NONE"},
LspDiagnosticsVirtualTextError { LspDiagnosticsDefaultError },
LspDiagnosticsVirtualTextWarning { LspDiagnosticsDefaultWarning },
LspDiagnosticsVirtualTextInformation { LspDiagnosticsDefaultInformation },
LspDiagnosticsVirtualTextHint { LspDiagnosticsDefaultHint },
LspDiagnosticsVirtualTextError {LspDiagnosticsDefaultError},
LspDiagnosticsVirtualTextWarning {LspDiagnosticsDefaultWarning},
LspDiagnosticsVirtualTextInformation {LspDiagnosticsDefaultInformation},
LspDiagnosticsVirtualTextHint {LspDiagnosticsDefaultHint},
LspDiagnosticsFloatingError {fg = c.error_red, gui = "NONE"},
LspDiagnosticsFloatingWarning {fg = c.warning_orange, gui = "NONE"},
LspDiagnosticsFloatingInformation {fg = c.info_yellow, gui = "NONE"},
LspDiagnosticsFloatingHint {fg = c.hint_blue, gui = "NONE"},
LspDiagnosticsFloatingError { fg = c.error_red, gui = "NONE" },
LspDiagnosticsFloatingWarning { fg = c.warning_orange, gui = "NONE" },
LspDiagnosticsFloatingInformation { fg = c.info_yellow, gui = "NONE" },
LspDiagnosticsFloatingHint { fg = c.hint_blue, gui = "NONE" },
LspDiagnosticsSignError {fg = c.error_red, gui = "NONE"},
LspDiagnosticsSignWarning {fg = c.warning_orange, gui = "NONE"},
LspDiagnosticsSignInformation {fg = c.info_yellow, gui = "NONE"},
LspDiagnosticsSignHint {fg = c.hint_blue, gui = "NONE"}, -- Tree-Sitter
LspDiagnosticsSignError { fg = c.error_red, gui = "NONE" },
LspDiagnosticsSignWarning { fg = c.warning_orange, gui = "NONE" },
LspDiagnosticsSignInformation { fg = c.info_yellow, gui = "NONE" },
LspDiagnosticsSignHint { fg = c.hint_blue, gui = "NONE" }, -- Tree-Sitter
LspDiagnosticsError {LspDiagnosticsSignError},
LspDiagnosticsWarning {LspDiagnosticsSignWarning},
LspDiagnosticsInformation {LspDiagnosticsSignInformation},
LspDiagnosticsHint {LspDiagnosticsSignHint},
LspDiagnosticsError { LspDiagnosticsSignError },
LspDiagnosticsWarning { LspDiagnosticsSignWarning },
LspDiagnosticsInformation { LspDiagnosticsSignInformation },
LspDiagnosticsHint { LspDiagnosticsSignHint },
-- LspReferenceText {bg = c.bg1, fg = "NONE", gui = "underline"},
-- LspReferenceRead {bg = c.bg1, fg = "NONE", gui = "underline"},
-- LspReferenceWrite {bg = c.bg1, fg = "NONE", gui = "underline"},
-- LspReferenceText {bg = c.bg1, fg = "NONE", gui = "underline"},
-- LspReferenceRead {bg = c.bg1, fg = "NONE", gui = "underline"},
-- LspReferenceWrite {bg = c.bg1, fg = "NONE", gui = "underline"},
LspDiagnosticsUnderlineError {fg = "NONE", gui = "underline", sp = c.red},
LspDiagnosticsUnderlineWarning {fg = "NONE", gui = "underline", sp = c.yellow},
LspDiagnosticsUnderlineInformation {fg = "NONE", gui = "underline", sp = c.blue},
LspDiagnosticsUnderlineHint {fg = "NONE", gui = "underline", sp = c.green},
LspDiagnosticsUnderlineError { fg = "NONE", gui = "underline", sp = c.red },
LspDiagnosticsUnderlineWarning { fg = "NONE", gui = "underline", sp = c.yellow },
LspDiagnosticsUnderlineInformation { fg = "NONE", gui = "underline", sp = c.blue },
LspDiagnosticsUnderlineHint { fg = "NONE", gui = "underline", sp = c.green },
-- gitsigns.nvim
SignAdd {fg = c.sign_add},
SignChange {fg = c.sign_change},
SignDelete {fg = c.sign_delete}, -- Any URI like a link or email.
GitSignsAdd {fg = c.sign_add},
GitSignsChange { fg = c.sign_change},
GitSignsDelete {fg = c.sign_delete},
-- gitsigns.nvim
SignAdd { fg = c.sign_add },
SignChange { fg = c.sign_change },
SignDelete { fg = c.sign_delete }, -- Any URI like a link or email.
GitSignsAdd { fg = c.sign_add },
GitSignsChange { fg = c.sign_change },
GitSignsDelete { fg = c.sign_delete },
-- telescope.nvim
TelescopeSelection {bg = "NONE", fg = c.aqua},
TelescopeMatching {bg = "NONE", fg = c.red, gui = "bold"},
TelescopeBorder {bg = c.bg1, fg = c.gray}, -- nvim-tree.lua
-- telescope.nvim
TelescopeSelection { bg = "NONE", fg = c.aqua },
TelescopeMatching { bg = "NONE", fg = c.red, gui = "bold" },
TelescopeBorder { bg = c.bg1, fg = c.gray }, -- nvim-tree.lua
-- Nvimtree
NvimTreeFolderIcon {fg = c.blue},
NvimTreeIndentMarker {fg = c.gray},
NvimTreeNormal {fg = c.white.da(10), bg = c.bg1},
NvimTreeFolderName {fg = c.blue},
NvimTreeOpenedFolderName {fg = c.aqua.da(10), gui = "italic"},
NvimTreeOpenedFile {NvimTreeOpenedFolderName},
NvimTreeRootFolder {fg = c.blue.da(20)},
NvimTreeExecFile {fg = c.green},
NvimTreeImageFile {fg = c.purple},
NvimTreeSpecialFile {fg = c.aqua},
-- Nvimtree
NvimTreeFolderIcon { fg = c.blue },
NvimTreeIndentMarker { fg = c.gray },
NvimTreeNormal { fg = c.white.da(10), bg = c.bg1 },
NvimTreeFolderName { fg = c.blue },
NvimTreeOpenedFolderName { fg = c.aqua.da(10), gui = "italic" },
NvimTreeOpenedFile { NvimTreeOpenedFolderName },
NvimTreeRootFolder { fg = c.blue.da(20) },
NvimTreeExecFile { fg = c.green },
NvimTreeImageFile { fg = c.purple },
NvimTreeSpecialFile { fg = c.aqua },
NvimTreeGitStaged {fg = c.sign_add},
NvimTreeGitNew {fg = c.sign_add},
NvimTreeGitDirty {fg = c.sign_add},
NvimTreeGitRenamed {fg = c.sign_change},
NvimTreeGitMerge {fg = c.sign_change},
NvimTreeGitDelete {fg = c.sign_delete},
NvimTreeVertSplit {fg = c.bg1, bg = c.bg1},
NvimTreeGitStaged { fg = c.sign_add },
NvimTreeGitNew { fg = c.sign_add },
NvimTreeGitDirty { fg = c.sign_add },
NvimTreeGitRenamed { fg = c.sign_change },
NvimTreeGitMerge { fg = c.sign_change },
NvimTreeGitDelete { fg = c.sign_delete },
NvimTreeVertSplit { fg = c.bg1, bg = c.bg1 },
-- BarBar
TabLine {bg = c.bg1, fg = c.white, gui = "NONE"},
TabLineFill {bg = c.bg1, fg = c.white, gui = "NONE"},
TabLineSel {bg = c.blue, fg = c.bg1, gui = "NONE"},
-- BarBar
TabLine { bg = c.bg1, fg = c.white, gui = "NONE" },
TabLineFill { bg = c.bg1, fg = c.white, gui = "NONE" },
TabLineSel { bg = c.blue, fg = c.bg1, gui = "NONE" },
BufferCurrent {fg = c.fg, bg = c.bg},
BufferCurrentIndex {fg = c.aqua, bg = c.bg},
BufferCurrentMod {fg = c.info_yellow, bg = c.bg},
BufferCurrentSign {fg = c.aqua, bg = c.bg},
BufferCurrentTarget {fg = c.red, bg = c.bg, gui = "bold"},
BufferCurrent { fg = c.fg, bg = c.bg },
BufferCurrentIndex { fg = c.aqua, bg = c.bg },
BufferCurrentMod { fg = c.info_yellow, bg = c.bg },
BufferCurrentSign { fg = c.aqua, bg = c.bg },
BufferCurrentTarget { fg = c.red, bg = c.bg, gui = "bold" },
BufferVisible {fg = c.fg, bg = c.bg},
BufferVisibleIndex {fg = c.fg, bg = c.bg},
BufferVisibleMod {fg = c.info_yellow, bg = c.bg},
BufferVisibleSign {fg = c.info_yellow, bg = c.bg},
BufferVisibleTarget {fg = c.red, bg = c.bg, gui = "bold"},
BufferVisible { fg = c.fg, bg = c.bg },
BufferVisibleIndex { fg = c.fg, bg = c.bg },
BufferVisibleMod { fg = c.info_yellow, bg = c.bg },
BufferVisibleSign { fg = c.info_yellow, bg = c.bg },
BufferVisibleTarget { fg = c.red, bg = c.bg, gui = "bold" },
BufferInactive {fg = c.gray, bg = c.bg1},
BufferInactiveIndex {fg = c.gray, bg = c.bg1},
BufferInactiveMod {fg = c.info_yellow, bg = c.bg1},
BufferInactiveSign {fg = c.gray, bg = c.bg1},
BufferInactiveTarget {fg = c.red, bg = c.bg1},
BufferInactive { fg = c.gray, bg = c.bg1 },
BufferInactiveIndex { fg = c.gray, bg = c.bg1 },
BufferInactiveMod { fg = c.info_yellow, bg = c.bg1 },
BufferInactiveSign { fg = c.gray, bg = c.bg1 },
BufferInactiveTarget { fg = c.red, bg = c.bg1 },
-- some fix for html related stuff
htmlH1 {Title}, -- markdown stuff
mkdLink {fg = c.aqua, gui = "underline"},
mkdLineBreak {bg = "NONE", fg = "NONE", gui = "NONE"},
mkdHeading {fg = c.white},
mkdInlineURL {mkdLink},
mkdUnderline {fg = c.gray},
markdownUrl {mkdLink},
markdownCode {fg = c.orange, bg = "NONE"},
markdownLinkTextDelimiter {Delimiter},
markdownLinkDelimiter {Delimiter},
markdownIdDelimiter {Delimiter},
markdownLinkText {fg = c.aqua},
markdownItalic {fg = "NONE", gui = "italic"}, -- flutter-tools.nvim
FlutterWidgetGuides {fg = c.gray.li(10)}, -- statusline
-- some fix for html related stuff
htmlH1 { Title }, -- markdown stuff
mkdLink { fg = c.aqua, gui = "underline" },
mkdLineBreak { bg = "NONE", fg = "NONE", gui = "NONE" },
mkdHeading { fg = c.white },
mkdInlineURL { mkdLink },
mkdUnderline { fg = c.gray },
markdownUrl { mkdLink },
markdownCode { fg = c.orange, bg = "NONE" },
markdownLinkTextDelimiter { Delimiter },
markdownLinkDelimiter { Delimiter },
markdownIdDelimiter { Delimiter },
markdownLinkText { fg = c.aqua },
markdownItalic { fg = "NONE", gui = "italic" }, -- flutter-tools.nvim
FlutterWidgetGuides { fg = c.gray.li(10) }, -- statusline
StatusLine {bg = c.bg1, fg = c.white}, -- status line of current window
StatusLineNC {bg = c.bg1, fg = c.light_gray}, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
StatusLineSeparator {bg = c.bg1, fg = "NONE"},
StatusLineGit {bg = c.bg1, fg = c.orange},
StatusLineGitAdd {bg = c.bg1, fg = c.green},
StatusLineGitChange {bg = c.bg1, fg = c.blue},
StatusLineGitDelete {bg = c.bg1, fg = c.red},
StatusLineLspDiagnosticsError {bg = c.bg1, fg = c.error_red, gui = "NONE"},
StatusLineLspDiagnosticsWarning {bg = c.bg1, fg = c.warning_orange, gui = "NONE"},
StatusLineLspDiagnosticsInformation {bg = c.bg1, fg = c.info_yellow, gui = "NONE"},
StatusLineLspDiagnosticsHint {bg = c.bg1, fg = c.hint_blue, gui = "NONE"},
StatusLineTreeSitter {bg = c.bg1, fg = c.green},
StatusLine { bg = c.bg1, fg = c.white }, -- status line of current window
StatusLineNC { bg = c.bg1, fg = c.light_gray }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
StatusLineSeparator { bg = c.bg1, fg = "NONE" },
StatusLineGit { bg = c.bg1, fg = c.orange },
StatusLineGitAdd { bg = c.bg1, fg = c.green },
StatusLineGitChange { bg = c.bg1, fg = c.blue },
StatusLineGitDelete { bg = c.bg1, fg = c.red },
StatusLineLspDiagnosticsError { bg = c.bg1, fg = c.error_red, gui = "NONE" },
StatusLineLspDiagnosticsWarning { bg = c.bg1, fg = c.warning_orange, gui = "NONE" },
StatusLineLspDiagnosticsInformation { bg = c.bg1, fg = c.info_yellow, gui = "NONE" },
StatusLineLspDiagnosticsHint { bg = c.bg1, fg = c.hint_blue, gui = "NONE" },
StatusLineTreeSitter { bg = c.bg1, fg = c.green },
-- StatusLineMode {bg = c.gray, fg = c.bg, gui = "bold"},
-- StatusLineDeco {bg = c.bg2, fg = c.yellow},
-- StatusLineLCol {bg = c.bg2, fg = c.white},
-- StatusLineLColAlt {bg = c.bg1, fg = c.white},
-- StatusLineFT {bg = c.bg2, fg = c.white},
-- StatusLineFTAlt {bg = c.bg2, fg = c.white},
-- StatusLineGitAlt {bg = c.gray, fg = c.bg},
-- StatusLineLSP {bg = c.bg1, fg = c.gray.li(25)},
-- StatusLineFileName {bg = c.bg1, fg = c.white, gui = "bold"},
-- StatusLineMode {bg = c.gray, fg = c.bg, gui = "bold"},
-- StatusLineDeco {bg = c.bg2, fg = c.yellow},
-- StatusLineLCol {bg = c.bg2, fg = c.white},
-- StatusLineLColAlt {bg = c.bg1, fg = c.white},
-- StatusLineFT {bg = c.bg2, fg = c.white},
-- StatusLineFTAlt {bg = c.bg2, fg = c.white},
-- StatusLineGitAlt {bg = c.gray, fg = c.bg},
-- StatusLineLSP {bg = c.bg1, fg = c.gray.li(25)},
-- StatusLineFileName {bg = c.bg1, fg = c.white, gui = "bold"},
-- lsp-trouble.nvim
LspTroubleIndent { fg = c.gray.li(10) }, -- tabline stuff
-- lsp-trouble.nvim
LspTroubleIndent {fg = c.gray.li(10)}, -- tabline stuff
-- tabline diagnostic
TabLineError { LspDiagnosticsSignError },
TabLineWarning { LspDiagnosticsSignWarning },
TabLineHint { LspDiagnosticsSignHint },
TabLineInformation { LspDiagnosticsSignInformation }, -- which-key.nvim
-- tabline diagnostic
TabLineError {LspDiagnosticsSignError},
TabLineWarning {LspDiagnosticsSignWarning},
TabLineHint {LspDiagnosticsSignHint},
TabLineInformation {LspDiagnosticsSignInformation}, -- which-key.nvim
WhichKey { fg = c.purple }, -- nvim-compe
WhichKeySeperator { fg = c.green }, -- nvim-compe
WhichKeyGroup { fg = c.blue }, -- nvim-compe
WhichKeyDesc { fg = c.aqua }, -- nvim-compe
WhichKeyFloat { bg = c.bg1 }, -- nvim-compe
WhichKey {fg = c.purple}, -- nvim-compe
WhichKeySeperator {fg = c.green}, -- nvim-compe
WhichKeyGroup {fg = c.blue}, -- nvim-compe
WhichKeyDesc {fg = c.aqua}, -- nvim-compe
WhichKeyFloat {bg = c.bg1}, -- nvim-compe
CompeDocumentation { Pmenu, fg = "NONE" }, -- diffview
DiffviewNormal { NvimTreeNormal },
DiffviewStatusAdded { SignAdd },
DiffviewStatusModified { SignChange },
DiffviewStatusRenamed { SignChange },
DiffviewStatusDeleted { SignDelete },
DiffviewFilePanelInsertion { SignAdd },
DiffviewFilePanelDeletion { SignDelete },
DiffviewVertSplit { fg = c.gray, bg = c.bg },
CompeDocumentation {Pmenu, fg = "NONE"}, -- diffview
DashboardHeader { fg = c.blue },
DashboardCenter { fg = c.purple },
DashboardFooter { fg = c.aqua },
DiffviewNormal {NvimTreeNormal},
DiffviewStatusAdded {SignAdd},
DiffviewStatusModified {SignChange},
DiffviewStatusRenamed {SignChange},
DiffviewStatusDeleted {SignDelete},
DiffviewFilePanelInsertion {SignAdd},
DiffviewFilePanelDeletion {SignDelete},
DiffviewVertSplit {fg = c.gray, bg = c.bg},
IndentBlanklineContextChar { fg = c.gray.da(20) },
DashboardHeader {fg = c.blue},
DashboardCenter {fg = c.purple},
DashboardFooter {fg = c.aqua},
IndentBlanklineContextChar {fg = c.gray.da(20)},
CodiVirtualText {fg = c.hint_blue}
}
CodiVirtualText { fg = c.hint_blue },
}
end)
-- return our parsed theme for extension or use else where.

View file

@ -2,39 +2,38 @@
-- return
-- end
require'nvim-treesitter.configs'.setup {
ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = O.treesitter.ignore_install,
matchup = {
enable = true -- mandatory, false will disable the whole extension
-- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
},
highlight = {
enable = O.treesitter.highlight.enabled -- false will disable the whole extension
},
context_commentstring = {enable = O.plugin.ts_context_commentstring, config = {css = '// %s'}},
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
-- TODO seems to be broken
indent = {enable = {"javascriptreact"}},
autotag = {enable = true},
require("nvim-treesitter.configs").setup {
ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = O.treesitter.ignore_install,
matchup = {
enable = true, -- mandatory, false will disable the whole extension
-- disable = { "c", "ruby" }, -- optional, list of language that will be disabled
},
highlight = {
enable = O.treesitter.highlight.enabled, -- false will disable the whole extension
},
context_commentstring = { enable = O.plugin.ts_context_commentstring, config = { css = "// %s" } },
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
-- TODO seems to be broken
indent = { enable = { "javascriptreact" } },
autotag = { enable = true },
playground = {
enable = O.plugin.ts_playground.active,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?'
}
}
playground = {
enable = O.plugin.ts_playground.active,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions
keybindings = {
toggle_query_editor = "o",
toggle_hl_groups = "i",
toggle_injected_languages = "t",
toggle_anonymous_nodes = "a",
toggle_language_display = "I",
focus_language = "f",
unfocus_language = "F",
update = "R",
goto_node = "<cr>",
show_help = "?",
},
},
}

View file

@ -1,27 +1,25 @@
local lv_utils = {}
function lv_utils.define_augroups(definitions) -- {{{1
-- Create autocommand groups based on the passed definitions
--
-- The key will be the name of the group, and each definition
-- within the group should have:
-- 1. Trigger
-- 2. Pattern
-- 3. Text
-- just like how they would normally be defined from Vim itself
for group_name, definition in pairs(definitions) do
vim.cmd('augroup ' .. group_name)
vim.cmd('autocmd!')
-- Create autocommand groups based on the passed definitions
--
-- The key will be the name of the group, and each definition
-- within the group should have:
-- 1. Trigger
-- 2. Pattern
-- 3. Text
-- just like how they would normally be defined from Vim itself
for group_name, definition in pairs(definitions) do
vim.cmd("augroup " .. group_name)
vim.cmd "autocmd!"
for _, def in pairs(definition) do
local command = table.concat(vim.tbl_flatten {'autocmd', def}, ' ')
vim.cmd(command)
end
vim.cmd('augroup END')
for _, def in pairs(definition) do
local command = table.concat(vim.tbl_flatten { "autocmd", def }, " ")
vim.cmd(command)
end
vim.cmd "augroup END"
end
end
return lv_utils

View file

@ -1,15 +1,15 @@
vim.g.vimtex_compiler_method='latexmk'
vim.g.vimtex_view_method='zathura'
vim.g.vimtex_fold_enabled=0
vim.g.vimtex_compiler_method = "latexmk"
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_fold_enabled = 0
-- Compile on initialization, cleanup on quit
vim.api.nvim_exec(
[[
[[
augroup vimtex_event_1
au!
au User VimtexEventQuit call vimtex#compiler#clean(0)
au User VimtexEventInitPost call vimtex#compiler#compile()
augroup END
]], false
]],
false
)

View file

@ -3,331 +3,329 @@
-- end
require("which-key").setup {
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
presets = {
operators = false, -- adds help for operators like d, y, ...
motions = false, -- adds help for motions
text_objects = false, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true -- bindings for prefixed with g
}
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
presets = {
operators = false, -- adds help for operators like d, y, ...
motions = false, -- adds help for motions
text_objects = false, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true, -- bindings for prefixed with g
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+" -- symbol prepended to a group
},
window = {
border = "single", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
},
layout = {
height = {min = 4, max = 25}, -- min and max height of the columns
width = {min = 20, max = 50}, -- min and max width of the columns
spacing = 3 -- spacing between columns
},
hidden = {"<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
show_help = true -- show help message on the command line when the popup is visible
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
window = {
border = "single", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
},
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3, -- spacing between columns
},
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
show_help = true, -- show help message on the command line when the popup is visible
}
-- Set leader
if O.leader_key == ' ' or O.leader_key == 'space' then
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>',
{noremap = true, silent = true})
vim.g.mapleader = ' '
if O.leader_key == " " or O.leader_key == "space" then
vim.api.nvim_set_keymap("n", "<Space>", "<NOP>", { noremap = true, silent = true })
vim.g.mapleader = " "
else
vim.api.nvim_set_keymap('n', O.leader_key, '<NOP>',
{noremap = true, silent = true})
vim.g.mapleader = O.leader_key
vim.api.nvim_set_keymap("n", O.leader_key, "<NOP>", { noremap = true, silent = true })
vim.g.mapleader = O.leader_key
end
local opts = {
mode = "n", -- NORMAL mode
prefix = "<leader>",
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
silent = true, -- use `silent` when creating keymaps
noremap = true, -- use `noremap` when creating keymaps
nowait = false -- use `nowait` when creating keymaps
mode = "n", -- NORMAL mode
prefix = "<leader>",
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
silent = true, -- use `silent` when creating keymaps
noremap = true, -- use `noremap` when creating keymaps
nowait = false, -- use `nowait` when creating keymaps
}
-- no hl
vim.api.nvim_set_keymap('n', '<Leader>h', ':let @/=""<CR>',
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>h", ':let @/=""<CR>', { noremap = true, silent = true })
-- explorer
-- TODO this introduces some bugs unfortunately
vim.api.nvim_set_keymap('n', '<Leader>e',
":lua require'lv-nvimtree'.toggle_tree()<CR>",
{noremap = true, silent = true})
vim.api.nvim_set_keymap(
"n",
"<Leader>e",
":lua require'lv-nvimtree'.toggle_tree()<CR>",
{ noremap = true, silent = true }
)
-- vim.api.nvim_set_keymap('n', '<Leader>e',
-- ":NvimTreeToggle<CR>",
-- {noremap = true, silent = true})
-- telescope or snap
if O.plugin.snap.active then
vim.api.nvim_set_keymap('n', '<Leader>f', ':Snap find_files<CR>',
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>f", ":Snap find_files<CR>", { noremap = true, silent = true })
else
vim.api.nvim_set_keymap('n', '<Leader>f', ':Telescope find_files<CR>',
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>", { noremap = true, silent = true })
end
-- dashboard
vim.api.nvim_set_keymap('n', '<Leader>;', ':Dashboard<CR>',
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>;", ":Dashboard<CR>", { noremap = true, silent = true })
-- Comments
vim.api.nvim_set_keymap("n", "<leader>/", ":CommentToggle<CR>",
{noremap = true, silent = true})
vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>",
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>/", ":CommentToggle<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true, silent = true })
-- close buffer
vim.api.nvim_set_keymap("n", "<leader>c", ":bdelete<CR>",
{noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>c", ":bdelete<CR>", { noremap = true, silent = true })
-- TODO create entire treesitter section
local mappings = {
["/"] = "Comment",
["c"] = "Close Buffer",
["e"] = "Explorer",
["f"] = "Find File",
["h"] = "No Highlight",
b = {
name = "Buffers",
j = {"<cmd>BufferPick<cr>", "jump to buffer"},
f = {O.plugin.snap.active and "<cmd>Snap buffers<cr>" or "<cmd>Telescope buffers<cr>", "Find buffer"},
w = {"<cmd>BufferWipeout<cr>", "wipeout buffer"},
e = {
"<cmd>BufferCloseAllButCurrent<cr>", "close all but current buffer"
},
h = {"<cmd>BufferCloseBuffersLeft<cr>", "close all buffers to the left"},
l = {
"<cmd>BufferCloseBuffersRight<cr>",
"close all BufferLines to the right"
},
D = {
"<cmd>BufferOrderByDirectory<cr>",
"sort BufferLines automatically by directory"
},
L = {
"<cmd>BufferOrderByLanguage<cr>",
"sort BufferLines automatically by language"
}
},
-- diagnostics vanilla nvim
-- -- diagnostic
-- function lv_utils.get_all()
-- vim.lsp.diagnostic.get_all()
-- end
-- function lv_utils.get_next()
-- vim.lsp.diagnostic.get_next()
-- end
-- function lv_utils.get_prev()
-- vim.lsp.diagnostic.get_prev()
-- end
-- function lv_utils.goto_next()
-- vim.lsp.diagnostic.goto_next()
-- end
-- function lv_utils.goto_prev()
-- vim.lsp.diagnostic.goto_prev()
-- end
-- function lv_utils.show_line_diagnostics()
-- vim.lsp.diagnostic.show_line_diagnostics()
-- end
-- " Available Debug Adapters:
-- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/
-- " Adapter configuration and installation instructions:
-- " https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation
-- " Debug Adapter protocol:
-- " https://microsoft.github.io/debug-adapter-protocol/
-- " Debugging
-- command! DebugToggleBreakpoint lua require'dap'.toggle_breakpoint()
-- command! DebugStart lua require'dap'.continue()
-- command! DebugContinue lua require'dap'.continue()
-- command! DebugStepOver lua require'dap'.step_over()
-- command! DebugStepOut lua require'dap'.step_out()
-- command! DebugStepInto lua require'dap'.step_into()
-- command! DebugToggleRepl lua require'dap'.repl.toggle()
-- command! DebugGetSession lua require'dap'.session()
-- D = {
-- name = "Debug",
-- b = {"<cmd>DebugToggleBreakpoint<cr>", "Toggle Breakpoint"},
-- c = {"<cmd>DebugContinue<cr>", "Continue"},
-- i = {"<cmd>DebugStepInto<cr>", "Step Into"},
-- o = {"<cmd>DebugStepOver<cr>", "Step Over"},
-- r = {"<cmd>DebugToggleRepl<cr>", "Toggle Repl"},
-- s = {"<cmd>DebugStart<cr>", "Start"}
-- },
g = {
name = "Git",
j = {"<cmd>lua require 'gitsigns'.next_hunk()<cr>", "Next Hunk"},
k = {"<cmd>lua require 'gitsigns'.prev_hunk()<cr>", "Prev Hunk"},
l = {"<cmd>lua require 'gitsigns'.blame_line()<cr>", "Blame"},
p = {"<cmd>lua require 'gitsigns'.preview_hunk()<cr>", "Preview Hunk"},
r = {"<cmd>lua require 'gitsigns'.reset_hunk()<cr>", "Reset Hunk"},
R = {"<cmd>lua require 'gitsigns'.reset_buffer()<cr>", "Reset Buffer"},
s = {"<cmd>lua require 'gitsigns'.stage_hunk()<cr>", "Stage Hunk"},
u = {
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>",
"Undo Stage Hunk"
},
o = {"<cmd>Telescope git_status<cr>", "Open changed file"},
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
c = {"<cmd>Telescope git_commits<cr>", "Checkout commit"},
C = {
"<cmd>Telescope git_bcommits<cr>",
"Checkout commit(for current file)"
}
["/"] = "Comment",
["c"] = "Close Buffer",
["e"] = "Explorer",
["f"] = "Find File",
["h"] = "No Highlight",
b = {
name = "Buffers",
j = { "<cmd>BufferPick<cr>", "jump to buffer" },
f = { O.plugin.snap.active and "<cmd>Snap buffers<cr>" or "<cmd>Telescope buffers<cr>", "Find buffer" },
w = { "<cmd>BufferWipeout<cr>", "wipeout buffer" },
e = {
"<cmd>BufferCloseAllButCurrent<cr>",
"close all but current buffer",
},
h = { "<cmd>BufferCloseBuffersLeft<cr>", "close all buffers to the left" },
l = {
name = "LSP",
a = {"<cmd>Lspsaga code_action<cr>", "Code Action"},
A = {"<cmd>Lspsaga range_code_action<cr>", "Selected Action"},
d = {
"<cmd>Telescope lsp_document_diagnostics<cr>",
"Document Diagnostics"
},
D = {
"<cmd>Telescope lsp_workspace_diagnostics<cr>",
"Workspace Diagnostics"
},
f = {"<cmd>lua vim.lsp.buf.formatting()<cr>", "Format"},
h = {"<cmd>Lspsaga hover_doc<cr>", "Hover Doc"},
i = {"<cmd>LspInfo<cr>", "Info"},
j = {"<cmd>Lspsaga diagnostic_jump_prev<cr>", "Prev Diagnostic"},
k = {"<cmd>Lspsaga diagnostic_jump_next<cr>", "Next Diagnostic"},
l = {"<cmd>Lspsaga lsp_finder<cr>", "LSP Finder"},
L = {"<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics"},
p = {"<cmd>Lspsaga preview_definition<cr>", "Preview Definition"},
q = {"<cmd>Telescope quickfix<cr>", "Quickfix"},
r = {"<cmd>Lspsaga rename<cr>", "Rename"},
t = {"<cmd>LspTypeDefinition<cr>", "Type Definition"},
x = {"<cmd>cclose<cr>", "Close Quickfix"},
s = {O.plugin.symbol_outline.active and "<cmd>SymbolsOutline<cr>" or
"<cmd> Telescope lsp_document_symbols<cr>", "Document Symbols"},
S = {
"<cmd>Telescope lsp_dynamic_workspace_symbols<cr>",
"Workspace Symbols"
}
"<cmd>BufferCloseBuffersRight<cr>",
"close all BufferLines to the right",
},
D = {
"<cmd>BufferOrderByDirectory<cr>",
"sort BufferLines automatically by directory",
},
L = {
"<cmd>BufferOrderByLanguage<cr>",
"sort BufferLines automatically by language",
},
},
-- diagnostics vanilla nvim
-- -- diagnostic
-- function lv_utils.get_all()
-- vim.lsp.diagnostic.get_all()
-- end
-- function lv_utils.get_next()
-- vim.lsp.diagnostic.get_next()
-- end
-- function lv_utils.get_prev()
-- vim.lsp.diagnostic.get_prev()
-- end
-- function lv_utils.goto_next()
-- vim.lsp.diagnostic.goto_next()
-- end
-- function lv_utils.goto_prev()
-- vim.lsp.diagnostic.goto_prev()
-- end
-- function lv_utils.show_line_diagnostics()
-- vim.lsp.diagnostic.show_line_diagnostics()
-- end
-- " Available Debug Adapters:
-- " https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/
-- " Adapter configuration and installation instructions:
-- " https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation
-- " Debug Adapter protocol:
-- " https://microsoft.github.io/debug-adapter-protocol/
-- " Debugging
-- command! DebugToggleBreakpoint lua require'dap'.toggle_breakpoint()
-- command! DebugStart lua require'dap'.continue()
-- command! DebugContinue lua require'dap'.continue()
-- command! DebugStepOver lua require'dap'.step_over()
-- command! DebugStepOut lua require'dap'.step_out()
-- command! DebugStepInto lua require'dap'.step_into()
-- command! DebugToggleRepl lua require'dap'.repl.toggle()
-- command! DebugGetSession lua require'dap'.session()
-- D = {
-- name = "Debug",
-- b = {"<cmd>DebugToggleBreakpoint<cr>", "Toggle Breakpoint"},
-- c = {"<cmd>DebugContinue<cr>", "Continue"},
-- i = {"<cmd>DebugStepInto<cr>", "Step Into"},
-- o = {"<cmd>DebugStepOver<cr>", "Step Over"},
-- r = {"<cmd>DebugToggleRepl<cr>", "Toggle Repl"},
-- s = {"<cmd>DebugStart<cr>", "Start"}
-- },
g = {
name = "Git",
j = { "<cmd>lua require 'gitsigns'.next_hunk()<cr>", "Next Hunk" },
k = { "<cmd>lua require 'gitsigns'.prev_hunk()<cr>", "Prev Hunk" },
l = { "<cmd>lua require 'gitsigns'.blame_line()<cr>", "Blame" },
p = { "<cmd>lua require 'gitsigns'.preview_hunk()<cr>", "Preview Hunk" },
r = { "<cmd>lua require 'gitsigns'.reset_hunk()<cr>", "Reset Hunk" },
R = { "<cmd>lua require 'gitsigns'.reset_buffer()<cr>", "Reset Buffer" },
s = { "<cmd>lua require 'gitsigns'.stage_hunk()<cr>", "Stage Hunk" },
u = {
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>",
"Undo Stage Hunk",
},
o = { "<cmd>Telescope git_status<cr>", "Open changed file" },
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
C = {
"<cmd>Telescope git_bcommits<cr>",
"Checkout commit(for current file)",
},
},
l = {
name = "LSP",
a = { "<cmd>Lspsaga code_action<cr>", "Code Action" },
A = { "<cmd>Lspsaga range_code_action<cr>", "Selected Action" },
d = {
"<cmd>Telescope lsp_document_diagnostics<cr>",
"Document Diagnostics",
},
D = {
"<cmd>Telescope lsp_workspace_diagnostics<cr>",
"Workspace Diagnostics",
},
f = { "<cmd>lua vim.lsp.buf.formatting()<cr>", "Format" },
h = { "<cmd>Lspsaga hover_doc<cr>", "Hover Doc" },
i = { "<cmd>LspInfo<cr>", "Info" },
j = { "<cmd>Lspsaga diagnostic_jump_prev<cr>", "Prev Diagnostic" },
k = { "<cmd>Lspsaga diagnostic_jump_next<cr>", "Next Diagnostic" },
l = { "<cmd>Lspsaga lsp_finder<cr>", "LSP Finder" },
L = { "<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics" },
p = { "<cmd>Lspsaga preview_definition<cr>", "Preview Definition" },
q = { "<cmd>Telescope quickfix<cr>", "Quickfix" },
r = { "<cmd>Lspsaga rename<cr>", "Rename" },
t = { "<cmd>LspTypeDefinition<cr>", "Type Definition" },
x = { "<cmd>cclose<cr>", "Close Quickfix" },
s = {
name = "Search",
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme"},
-- d = {
-- "<cmd>Telescope lsp_document_diagnostics<cr>",
-- "Document Diagnostics"
-- },
-- D = {
-- "<cmd>Telescope lsp_workspace_diagnostics<cr>",
-- "Workspace Diagnostics"
-- },
f = {O.plugin.snap.active and "<cmd>Snap find_files<cr>" or "<cmd>Telescope find_files<cr>", "Find File"},
h = {"<cmd>Telescope help_tags<cr>", "Find Help"},
-- m = {"<cmd>Telescope marks<cr>", "Marks"},
M = {"<cmd>Telescope man_pages<cr>", "Man Pages"},
r = {O.plugin.snap.active and "<cmd>Snap oldfiles<cr>" or "<cmd>Telescope oldfiles<cr>", "Open Recent File"},
R = {"<cmd>Telescope registers<cr>", "Registers"},
t = {O.plugin.snap.active and "<cmd>Snap live_grep<cr>" or "<cmd>Telescope live_grep<cr>", "Text"}
O.plugin.symbol_outline.active and "<cmd>SymbolsOutline<cr>" or "<cmd> Telescope lsp_document_symbols<cr>",
"Document Symbols",
},
S = {
name = "Session",
s = {"<cmd>SessionSave<cr>", "Save Session"},
l = {"<cmd>SessionLoad<cr>", "Load Session"}
"<cmd>Telescope lsp_dynamic_workspace_symbols<cr>",
"Workspace Symbols",
},
T = {
name = "Treesitter",
i = {":TSConfigInfo<cr>", "Info"}
}
},
s = {
name = "Search",
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
c = { "<cmd>Telescope colorscheme<cr>", "Colorscheme" },
-- d = {
-- "<cmd>Telescope lsp_document_diagnostics<cr>",
-- "Document Diagnostics"
-- },
-- D = {
-- "<cmd>Telescope lsp_workspace_diagnostics<cr>",
-- "Workspace Diagnostics"
-- },
f = { O.plugin.snap.active and "<cmd>Snap find_files<cr>" or "<cmd>Telescope find_files<cr>", "Find File" },
h = { "<cmd>Telescope help_tags<cr>", "Find Help" },
-- m = {"<cmd>Telescope marks<cr>", "Marks"},
M = { "<cmd>Telescope man_pages<cr>", "Man Pages" },
r = { O.plugin.snap.active and "<cmd>Snap oldfiles<cr>" or "<cmd>Telescope oldfiles<cr>", "Open Recent File" },
R = { "<cmd>Telescope registers<cr>", "Registers" },
t = { O.plugin.snap.active and "<cmd>Snap live_grep<cr>" or "<cmd>Telescope live_grep<cr>", "Text" },
},
S = {
name = "Session",
s = { "<cmd>SessionSave<cr>", "Save Session" },
l = { "<cmd>SessionLoad<cr>", "Load Session" },
},
T = {
name = "Treesitter",
i = { ":TSConfigInfo<cr>", "Info" },
},
}
if O.plugin.spectre.active then
mappings['r'] = {
name = "Replace",
f = {
"<cmd>lua require('spectre').open_file_search()<cr>", "Current File"
},
p = {"<cmd>lua require('spectre').open()<cr>", "Project"}
}
mappings["r"] = {
name = "Replace",
f = {
"<cmd>lua require('spectre').open_file_search()<cr>",
"Current File",
},
p = { "<cmd>lua require('spectre').open()<cr>", "Project" },
}
end
if O.plugin.trouble.active then
mappings['d'] = {
name = "Diagnostics",
t = {"<cmd>TroubleToggle<cr>", "trouble"},
w = {"<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace"},
d = {"<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document"},
q = {"<cmd>TroubleToggle quickfix<cr>", "quickfix"},
l = {"<cmd>TroubleToggle loclist<cr>", "loclist"},
r = {"<cmd>TroubleToggle lsp_references<cr>", "references"}
}
mappings["d"] = {
name = "Diagnostics",
t = { "<cmd>TroubleToggle<cr>", "trouble" },
w = { "<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace" },
d = { "<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document" },
q = { "<cmd>TroubleToggle quickfix<cr>", "quickfix" },
l = { "<cmd>TroubleToggle loclist<cr>", "loclist" },
r = { "<cmd>TroubleToggle lsp_references<cr>", "references" },
}
end
if O.plugin.gitlinker.active then mappings["gy"] = "Gitlink" end
if O.plugin.gitlinker.active then
mappings["gy"] = "Gitlink"
end
if O.plugin.ts_playground.active then
vim.api.nvim_set_keymap("n", "<leader>Th",
":TSHighlightCapturesUnderCursor<CR>",
{noremap = true, silent = true})
mappings[""] = "Highlight Capture"
vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true })
mappings[""] = "Highlight Capture"
end
if O.plugin.zen.active then
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>",
{noremap = true, silent = true})
mappings["z"] = "Zen"
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true })
mappings["z"] = "Zen"
end
if O.plugin.lazygit.active then
vim.api.nvim_set_keymap("n", "<leader>gg", ":LazyGit<CR>",
{noremap = true, silent = true})
mappings["gg"] = "LazyGit"
vim.api.nvim_set_keymap("n", "<leader>gg", ":LazyGit<CR>", { noremap = true, silent = true })
mappings["gg"] = "LazyGit"
end
if O.plugin.telescope_project.active then
-- open projects
vim.api.nvim_set_keymap('n', '<leader>p',
":lua require'telescope'.extensions.project.project{}<CR>",
{noremap = true, silent = true})
mappings["p"] = "Projects"
-- open projects
vim.api.nvim_set_keymap(
"n",
"<leader>p",
":lua require'telescope'.extensions.project.project{}<CR>",
{ noremap = true, silent = true }
)
mappings["p"] = "Projects"
end
-- [";"] = "Dashboard",
if O.lang.latex.active then
mappings["L"] = {
name = "+Latex",
c = {"<cmd>VimtexCompile<cr>", "Toggle Compilation Mode"},
f = {"<cmd>call vimtex#fzf#run()<cr>", "Fzf Find"},
i = {"<cmd>VimtexInfo<cr>", "Project Information"},
s = {"<cmd>VimtexStop<cr>", "Stop Project Compilation"},
t = {"<cmd>VimtexTocToggle<cr>", "Toggle Table Of Content"},
v = {"<cmd>VimtexView<cr>", "View PDF"}
}
mappings["L"] = {
name = "+Latex",
c = { "<cmd>VimtexCompile<cr>", "Toggle Compilation Mode" },
f = { "<cmd>call vimtex#fzf#run()<cr>", "Fzf Find" },
i = { "<cmd>VimtexInfo<cr>", "Project Information" },
s = { "<cmd>VimtexStop<cr>", "Stop Project Compilation" },
t = { "<cmd>VimtexTocToggle<cr>", "Toggle Table Of Content" },
v = { "<cmd>VimtexView<cr>", "View PDF" },
}
end
if O.lushmode then
mappings["L"] = {
name = "+Lush",
l = {":Lushify<cr>", "Lushify"},
x = {":lua require('lush').export_to_buffer(require('lush_theme.cool_name'))", "Lush Export"},
t = {":LushRunTutorial<cr>", "Lush Tutorial"},
q = {":LushRunQuickstart<cr>", "Lush Quickstart"}
}
mappings["L"] = {
name = "+Lush",
l = { ":Lushify<cr>", "Lushify" },
x = { ":lua require('lush').export_to_buffer(require('lush_theme.cool_name'))", "Lush Export" },
t = { ":LushRunTutorial<cr>", "Lush Tutorial" },
q = { ":LushRunQuickstart<cr>", "Lush Quickstart" },
}
end
local wk = require("which-key")
local wk = require "which-key"
wk.register(mappings, opts)

View file

@ -1,26 +1,26 @@
local M = {}
M.config = function()
require("zen-mode").setup {
window = {
backdrop = 1,
height = .85, -- height of the Zen window
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
}
},
plugins = {
gitsigns = {enabled = false} -- disables git signs
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}
require("zen-mode").setup {
window = {
backdrop = 1,
height = 0.85, -- height of the Zen window
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false, -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
gitsigns = { enabled = false }, -- disables git signs
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
}
end
return M

View file

@ -1,458 +1,459 @@
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 = fn.stdpath "data" .. "/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"
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
execute "packadd packer.nvim"
end
local packer_ok, packer = pcall(require, "packer")
if not packer_ok then return end
if not packer_ok then
return
end
packer.init {
-- compile_path = vim.fn.stdpath('data')..'/site/pack/loader/start/packer.nvim/plugin/packer_compiled.vim',
compile_path = require("packer.util").join_paths(vim.fn.stdpath('config'),
'plugin',
'packer_compiled.vim'),
git = {clone_timeout = 300},
display = {
open_fn = function()
return require("packer.util").float {border = "single"}
end
}
-- compile_path = vim.fn.stdpath('data')..'/site/pack/loader/start/packer.nvim/plugin/packer_compiled.vim',
compile_path = require("packer.util").join_paths(vim.fn.stdpath "config", "plugin", "packer_compiled.vim"),
git = { clone_timeout = 300 },
display = {
open_fn = function()
return require("packer.util").float { border = "single" }
end,
},
}
vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua
vim.cmd "autocmd BufWritePost plugins.lua PackerCompile"
return require("packer").startup(function(use)
-- Packer can manage itself as an optional plugin
use "wbthomason/packer.nvim"
-- Packer can manage itself as an optional plugin
use "wbthomason/packer.nvim"
-- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
use {"neovim/nvim-lspconfig"}
use {"glepnir/lspsaga.nvim", cmd = "Lspsaga"}
use {"kabouzeid/nvim-lspinstall", cmd = "LspInstall"}
-- Telescope
use {"nvim-lua/popup.nvim"}
use {"nvim-lua/plenary.nvim"}
use {"tjdevries/astronauta.nvim"}
use {
"nvim-telescope/telescope.nvim",
config = [[require('lv-telescope')]],
cmd = "Telescope"
}
-- Snap TODO disable for now, need to only install fzy when user specifies they want to use snap
-- use {
-- "camspiers/snap",
-- rocks = "fzy",
-- config = function()
-- require("lv-snap").config()
-- end,
-- disable = not O.plugin.snap.active
-- }
-- Autocomplete
use {
"hrsh7th/nvim-compe",
event = "InsertEnter",
config = function()
require("lv-compe").config()
end
}
-- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
use { "neovim/nvim-lspconfig" }
use { "glepnir/lspsaga.nvim", cmd = "Lspsaga" }
use { "kabouzeid/nvim-lspinstall", cmd = "LspInstall" }
-- Telescope
use { "nvim-lua/popup.nvim" }
use { "nvim-lua/plenary.nvim" }
use { "tjdevries/astronauta.nvim" }
use {
"nvim-telescope/telescope.nvim",
config = [[require('lv-telescope')]],
cmd = "Telescope",
}
-- Snap TODO disable for now, need to only install fzy when user specifies they want to use snap
-- use {
-- "camspiers/snap",
-- rocks = "fzy",
-- config = function()
-- require("lv-snap").config()
-- end,
-- disable = not O.plugin.snap.active
-- }
-- Autocomplete
use {
"hrsh7th/nvim-compe",
event = "InsertEnter",
config = function()
require("lv-compe").config()
end,
}
use {"hrsh7th/vim-vsnip", event = "InsertEnter"}
use {"rafamadriz/friendly-snippets", event = "InsertEnter"}
use { "hrsh7th/vim-vsnip", event = "InsertEnter" }
use { "rafamadriz/friendly-snippets", event = "InsertEnter" }
-- Treesitter
use {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}
-- Treesitter
use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }
use {
"kyazdani42/nvim-tree.lua",
-- cmd = "NvimTreeToggle",
config = function()
require("lv-nvimtree").config()
end
}
use {
"kyazdani42/nvim-tree.lua",
-- cmd = "NvimTreeToggle",
config = function()
require("lv-nvimtree").config()
end,
}
use {
"lewis6991/gitsigns.nvim",
use {
"lewis6991/gitsigns.nvim",
config = function()
require("lv-gitsigns").config()
end,
event = "BufRead"
}
config = function()
require("lv-gitsigns").config()
end,
event = "BufRead",
}
-- whichkey
use {"folke/which-key.nvim"}
-- whichkey
use { "folke/which-key.nvim" }
-- Autopairs
use {
"windwp/nvim-autopairs",
event = "InsertEnter",
after = {"telescope.nvim", "nvim-compe"},
config = function()
require 'lv-autopairs'
end
}
-- Autopairs
use {
"windwp/nvim-autopairs",
event = "InsertEnter",
after = { "telescope.nvim", "nvim-compe" },
config = function()
require "lv-autopairs"
end,
}
-- Comments
use {
"terrortylor/nvim-comment",
cmd = "CommentToggle",
config = function()
require('nvim_comment').setup()
end
}
-- Comments
use {
"terrortylor/nvim-comment",
cmd = "CommentToggle",
config = function()
require("nvim_comment").setup()
end,
}
-- Color
use {"christianchiarulli/nvcode-color-schemes.vim", opt = true}
-- Color
use { "christianchiarulli/nvcode-color-schemes.vim", opt = true }
-- Icons
use {"kyazdani42/nvim-web-devicons"}
-- Icons
use { "kyazdani42/nvim-web-devicons" }
-- Status Line and Bufferline
use {"glepnir/galaxyline.nvim"}
-- Status Line and Bufferline
use { "glepnir/galaxyline.nvim" }
use {
"akinsho/nvim-bufferline.lua",
config = function()
require("lv-bufferline").config()
end,
event = "BufRead"
use {
"akinsho/nvim-bufferline.lua",
config = function()
require("lv-bufferline").config()
end,
event = "BufRead",
}
}
-- Extras, these do not load by default
-- Extras, these do not load by default
-- Better motions
use {
"phaazon/hop.nvim",
event = "BufRead",
config = function()
require("lv-hop").config()
end,
disable = not O.plugin.hop.active,
opt = true,
}
-- Enhanced increment/decrement
use {
"monaqa/dial.nvim",
event = "BufRead",
config = function()
require("lv-dial").config()
end,
disable = not O.plugin.dial.active,
opt = true,
}
-- Dashboard
use {
"ChristianChiarulli/dashboard-nvim",
event = "BufWinEnter",
cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" },
config = function()
require("lv-dashboard").config()
end,
disable = not O.plugin.dashboard.active,
opt = true,
}
-- Zen Mode
use {
"folke/zen-mode.nvim",
cmd = "ZenMode",
-- event = "BufRead",
config = function()
require("lv-zen").config()
end,
disable = not O.plugin.zen.active,
}
-- Ranger
use {
"kevinhwang91/rnvimr",
cmd = "Rnvimr",
config = function()
require("lv-rnvimr").config()
end,
disable = not O.plugin.ranger.active,
}
-- Better motions
use {
'phaazon/hop.nvim',
event = 'BufRead',
config = function()
require('lv-hop').config()
end,
disable = not O.plugin.hop.active,
opt = true
}
-- Enhanced increment/decrement
use {
'monaqa/dial.nvim',
event = 'BufRead',
config = function()
require('lv-dial').config()
end,
disable = not O.plugin.dial.active,
opt = true
}
-- Dashboard
use {
"ChristianChiarulli/dashboard-nvim",
event = 'BufWinEnter',
cmd = {"Dashboard", "DashboardNewFile", "DashboardJumpMarks"},
config = function()
require('lv-dashboard').config()
end,
disable = not O.plugin.dashboard.active,
opt = true
}
-- Zen Mode
use {
"folke/zen-mode.nvim",
cmd = "ZenMode",
-- event = "BufRead",
config = function()
require('lv-zen').config()
end,
disable = not O.plugin.zen.active
}
-- Ranger
use {
"kevinhwang91/rnvimr",
cmd = "Rnvimr",
config = function()
require('lv-rnvimr').config()
end,
disable = not O.plugin.ranger.active
}
-- matchup
use {
"andymass/vim-matchup",
event = "CursorMoved",
config = function()
require("lv-matchup").config()
end,
disable = not O.plugin.matchup.active,
}
-- matchup
use {
'andymass/vim-matchup',
event = "CursorMoved",
config = function()
require('lv-matchup').config()
end,
disable = not O.plugin.matchup.active
}
use {
"norcalli/nvim-colorizer.lua",
event = "BufRead",
config = function()
require("colorizer").setup()
vim.cmd "ColorizerReloadAllBuffers"
end,
disable = not O.plugin.colorizer.active,
}
use {
"norcalli/nvim-colorizer.lua",
event = "BufRead",
config = function()
require("colorizer").setup()
vim.cmd("ColorizerReloadAllBuffers")
end,
disable = not O.plugin.colorizer.active
}
use {
"nacro90/numb.nvim",
event = "BufRead",
config = function()
require("numb").setup {
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true, -- Enable 'cursorline' for the window while peeking
}
end,
disable = not O.plugin.numb.active,
}
use {
"nacro90/numb.nvim",
event = "BufRead",
config = function()
require('numb').setup {
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true -- Enable 'cursorline' for the window while peeking
}
end,
disable = not O.plugin.numb.active
}
-- Treesitter playground
use {
"nvim-treesitter/playground",
event = "BufRead",
disable = not O.plugin.ts_playground.active,
}
-- Treesitter playground
use {
'nvim-treesitter/playground',
event = "BufRead",
disable = not O.plugin.ts_playground.active
}
use {
"lukas-reineke/indent-blankline.nvim",
event = "BufRead",
setup = function()
vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = ""
use {
"lukas-reineke/indent-blankline.nvim",
event = "BufRead",
setup = function()
vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard" }
vim.g.indent_blankline_buftype_exclude = { "terminal" }
vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = ""
vim.g.indent_blankline_show_trailing_blankline_indent = false
vim.g.indent_blankline_show_first_indent_level = true
end,
disable = not O.plugin.indent_line.active,
}
vim.g.indent_blankline_filetype_exclude =
{"help", "terminal", "dashboard"}
vim.g.indent_blankline_buftype_exclude = {"terminal"}
-- comments in context
use {
"JoosepAlviste/nvim-ts-context-commentstring",
event = "BufRead",
disable = not O.plugin.ts_context_commentstring.active,
}
vim.g.indent_blankline_show_trailing_blankline_indent = false
vim.g.indent_blankline_show_first_indent_level = true
end,
disable = not O.plugin.indent_line.active
}
-- comments in context
use {
'JoosepAlviste/nvim-ts-context-commentstring',
event = "BufRead",
disable = not O.plugin.ts_context_commentstring.active
}
-- Symbol Outline
use {
'simrat39/symbols-outline.nvim',
cmd = 'SymbolsOutline',
disable = not O.plugin.symbol_outline.active
}
-- diagnostics
use {
"folke/trouble.nvim",
cmd = 'TroubleToggle',
disable = not O.plugin.trouble.active
}
-- Debugging
use {
"mfussenegger/nvim-dap",
event = "BufRead",
disable = not O.plugin.debug.active
}
-- Better quickfix
use {
"kevinhwang91/nvim-bqf",
event = "BufRead",
disable = not O.plugin.bqf.active
}
-- Floating terminal
use {
'numToStr/FTerm.nvim',
event = "BufRead",
config = function()
require'FTerm'.setup({
dimensions = {height = 0.8, width = 0.8, x = 0.5, y = 0.5},
border = 'single' -- or 'double'
})
end,
disable = not O.plugin.floatterm.active
}
-- Search & Replace
use {
'windwp/nvim-spectre',
event = "BufRead",
config = function()
require('spectre').setup()
end,
disable = not O.plugin.spectre.active
}
-- lsp root with this nvim-tree will follow you
use {
"ahmedkhalf/lsp-rooter.nvim",
event = "BufRead",
config = function()
require("lsp-rooter").setup()
end,
disable = not O.plugin.lsp_rooter.active
}
-- Markdown preview
use {
'iamcco/markdown-preview.nvim',
run = 'cd app && npm install',
ft = 'markdown',
disable = not O.plugin.markdown_preview.active
}
-- Interactive scratchpad
use {
'metakirby5/codi.vim',
cmd = 'Codi',
disable = not O.plugin.codi.active
}
-- Use fzy for telescope
use {
"nvim-telescope/telescope-fzy-native.nvim",
event = "BufRead",
disable = not O.plugin.telescope_fzy.active
}
-- Use project for telescope
use {
"nvim-telescope/telescope-project.nvim",
event = "BufRead",
after = "telescope.nvim",
disable = not O.plugin.telescope_project.active
}
-- Sane gx for netrw_gx bug
use {
"felipec/vim-sanegx",
event = "BufRead",
disable = not O.plugin.sanegx.active
}
-- Sane gx for netrw_gx bug
use {
"folke/todo-comments.nvim",
event = "BufRead",
disable = not O.plugin.todo_comments.active
}
-- LSP Colors
use {
"folke/lsp-colors.nvim",
event = "BufRead",
disable = not O.plugin.lsp_colors.active
}
-- Git Blame
use {
"f-person/git-blame.nvim",
event = "BufRead",
disable = not O.plugin.git_blame.active
}
use {
'ruifm/gitlinker.nvim',
event = "BufRead",
config = function()
require"gitlinker".setup({
opts = {
-- remote = 'github', -- force the use of a specific remote
-- adds current line nr in the url for normal mode
add_current_line_on_normal_mode = true,
-- callback for what to do with the url
action_callback = require"gitlinker.actions".open_in_browser,
-- print the url after performing the action
print_url = false,
-- mapping to call url generation
mappings = "<leader>gy"
}
})
end,
disable = not O.plugin.gitlinker.active,
requires = 'nvim-lua/plenary.nvim'
}
-- Lazygit
use {
"kdheepak/lazygit.nvim",
cmd = "LazyGit",
disable = not O.plugin.lazygit.active
}
-- Octo
use {
"pwntester/octo.nvim",
event = "BufRead",
disable = not O.plugin.octo.active
}
-- Diffview
use {
"sindrets/diffview.nvim",
event = "BufRead",
disable = not O.plugin.diffview.active
}
-- Easily Create Gists
use {
"mattn/vim-gist",
event = "BufRead",
disable = not O.plugin.gist.active,
requires = 'mattn/webapi-vim'
}
-- Lush Create Color Schemes
use {
"rktjmp/lush.nvim",
-- cmd = {"LushRunQuickstart", "LushRunTutorial", "Lushify"},
disable = not O.plugin.lush.active
}
-- HTML preview
use {
'turbio/bracey.vim',
event = "BufRead",
run = 'npm install --prefix server',
disable = not O.plugin.bracey.active
}
-- Debugger management
use {
'Pocco81/DAPInstall.nvim',
event = "BufRead",
disable = not O.plugin.dap_install.active
}
-- LANGUAGE SPECIFIC GOES HERE
use {"lervag/vimtex", ft = "tex" }
-- Rust tools
-- TODO: use lazy loading maybe?
use {
"simrat39/rust-tools.nvim",
disable = not O.lang.rust.rust_tools.active
}
-- Elixir
use {"elixir-editors/vim-elixir", ft = {"elixir", "eelixir", "euphoria3"}}
-- Javascript / Typescript
use {
"jose-elias-alvarez/nvim-lsp-ts-utils",
ft = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
}
}
use {
"jose-elias-alvarez/null-ls.nvim",
ft = {
"javascript", "javascriptreact", "javascript.jsx", "typescript",
"typescriptreact", "typescript.tsx"
-- Symbol Outline
use {
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
disable = not O.plugin.symbol_outline.active,
}
-- diagnostics
use {
"folke/trouble.nvim",
cmd = "TroubleToggle",
disable = not O.plugin.trouble.active,
}
-- Debugging
use {
"mfussenegger/nvim-dap",
event = "BufRead",
disable = not O.plugin.debug.active,
}
-- Better quickfix
use {
"kevinhwang91/nvim-bqf",
event = "BufRead",
disable = not O.plugin.bqf.active,
}
-- Floating terminal
use {
"numToStr/FTerm.nvim",
event = "BufRead",
config = function()
require("FTerm").setup {
dimensions = { height = 0.8, width = 0.8, x = 0.5, y = 0.5 },
border = "single", -- or 'double'
}
end,
disable = not O.plugin.floatterm.active,
}
-- Search & Replace
use {
"windwp/nvim-spectre",
event = "BufRead",
config = function()
require("spectre").setup()
end,
disable = not O.plugin.spectre.active,
}
-- lsp root with this nvim-tree will follow you
use {
"ahmedkhalf/lsp-rooter.nvim",
event = "BufRead",
config = function()
require("lsp-rooter").setup()
end,
disable = not O.plugin.lsp_rooter.active,
}
-- Markdown preview
use {
"iamcco/markdown-preview.nvim",
run = "cd app && npm install",
ft = "markdown",
disable = not O.plugin.markdown_preview.active,
}
-- Interactive scratchpad
use {
"metakirby5/codi.vim",
cmd = "Codi",
disable = not O.plugin.codi.active,
}
-- Use fzy for telescope
use {
"nvim-telescope/telescope-fzy-native.nvim",
event = "BufRead",
disable = not O.plugin.telescope_fzy.active,
}
-- Use project for telescope
use {
"nvim-telescope/telescope-project.nvim",
event = "BufRead",
after = "telescope.nvim",
disable = not O.plugin.telescope_project.active,
}
-- Sane gx for netrw_gx bug
use {
"felipec/vim-sanegx",
event = "BufRead",
disable = not O.plugin.sanegx.active,
}
-- Sane gx for netrw_gx bug
use {
"folke/todo-comments.nvim",
event = "BufRead",
disable = not O.plugin.todo_comments.active,
}
-- LSP Colors
use {
"folke/lsp-colors.nvim",
event = "BufRead",
disable = not O.plugin.lsp_colors.active,
}
-- Git Blame
use {
"f-person/git-blame.nvim",
event = "BufRead",
disable = not O.plugin.git_blame.active,
}
use {
"ruifm/gitlinker.nvim",
event = "BufRead",
config = function()
require("gitlinker").setup {
opts = {
-- remote = 'github', -- force the use of a specific remote
-- adds current line nr in the url for normal mode
add_current_line_on_normal_mode = true,
-- callback for what to do with the url
action_callback = require("gitlinker.actions").open_in_browser,
-- print the url after performing the action
print_url = false,
-- mapping to call url generation
mappings = "<leader>gy",
},
config = function()
require('null-ls').setup()
end
}
}
end,
disable = not O.plugin.gitlinker.active,
requires = "nvim-lua/plenary.nvim",
}
-- Lazygit
use {
"kdheepak/lazygit.nvim",
cmd = "LazyGit",
disable = not O.plugin.lazygit.active,
}
-- Octo
use {
"pwntester/octo.nvim",
event = "BufRead",
disable = not O.plugin.octo.active,
}
-- Diffview
use {
"sindrets/diffview.nvim",
event = "BufRead",
disable = not O.plugin.diffview.active,
}
-- Easily Create Gists
use {
"mattn/vim-gist",
event = "BufRead",
disable = not O.plugin.gist.active,
requires = "mattn/webapi-vim",
}
-- Lush Create Color Schemes
use {
"rktjmp/lush.nvim",
-- cmd = {"LushRunQuickstart", "LushRunTutorial", "Lushify"},
disable = not O.plugin.lush.active,
}
-- HTML preview
use {
"turbio/bracey.vim",
event = "BufRead",
run = "npm install --prefix server",
disable = not O.plugin.bracey.active,
}
-- Debugger management
use {
"Pocco81/DAPInstall.nvim",
event = "BufRead",
disable = not O.plugin.dap_install.active,
}
-- Tabnine
use {
"tzachar/compe-tabnine",
run = "./install.sh",
requires = "hrsh7th/nvim-compe",
disable = not O.plugin.tabnine.active
}
-- LANGUAGE SPECIFIC GOES HERE
use { "lervag/vimtex", ft = "tex" }
-- Rust tools
-- TODO: use lazy loading maybe?
use {
"simrat39/rust-tools.nvim",
disable = not O.lang.rust.rust_tools.active,
}
-- Elixir
use { "elixir-editors/vim-elixir", ft = { "elixir", "eelixir", "euphoria3" } }
-- Javascript / Typescript
use {
"jose-elias-alvarez/nvim-lsp-ts-utils",
ft = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
}
use {
"jose-elias-alvarez/null-ls.nvim",
ft = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
config = function()
require("null-ls").setup()
end,
}
-- Tabnine
use {
"tzachar/compe-tabnine",
run = "./install.sh",
requires = "hrsh7th/nvim-compe",
disable = not O.plugin.tabnine.active,
}
end)

View file

@ -3,17 +3,16 @@
local cmd = vim.cmd
local opt = vim.opt
--- VIM ONLY COMMANDS ---
cmd('filetype plugin on') -- filetype detection
cmd('let &titleold="'..TERMINAL..'"')
cmd('set inccommand=split') -- show what you are substituting in real time
cmd('set iskeyword+=-') -- treat dash as a separate word
cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
cmd "filetype plugin on"
cmd('let &titleold="' .. TERMINAL .. '"')
cmd "set inccommand=split"
cmd "set iskeyword+=-"
cmd "set whichwrap+=<,>,[,],h,l"
if O.transparent_window then
cmd('au ColorScheme * hi Normal ctermbg=none guibg=none')
end
cmd "au ColorScheme * hi Normal ctermbg=none guibg=none"
end
--- COLORSCHEME ---
@ -21,41 +20,40 @@ vim.g.colors_name = O.colorscheme
--- SETTINGS ---
opt.backup = false -- creates a backup file
opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
opt.cmdheight = 2 -- more space in the neovim command line for displaying messages
opt.colorcolumn = "99999" -- fix indentline for now
opt.completeopt = {'menuone', 'noselect'}
opt.conceallevel = 0 -- so that `` is visible in markdown files
opt.fileencoding = "utf-8" -- the encoding written to a file
opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
opt.hidden = O.hidden_files -- required to keep multiple buffers and open multiple buffers
opt.hlsearch = O.hl_search -- highlight all matches on previous search pattern
opt.ignorecase = O.ignore_case -- ignore case in search patterns
opt.mouse = "a" -- allow the mouse to be used in neovim
opt.pumheight = 10 -- pop up menu height
opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
opt.showtabline = 2 -- always show tabs
opt.smartcase = O.smart_case -- smart case
opt.smartindent = true -- make indenting smarter again
opt.splitbelow = true -- force all horizontal splits to go below current window
opt.splitright = true -- force all vertical splits to go to the right of current window
opt.swapfile = false -- creates a swapfile
opt.termguicolors = true -- set term gui colors (most terminals support this)
opt.timeoutlen = O.timeoutlen -- time to wait for a mapped sequence to complete (in milliseconds)
opt.title = true -- set the title of window to the value of the titlestring
opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
opt.undodir = CACHE_PATH .. '/undo' -- set an undo directory
opt.undofile = true -- enable persisten undo
opt.updatetime = 300 -- faster completion
opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
opt.expandtab = true -- convert tabs to spaces
opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
opt.shortmess:append("c") -- don't pass messages to |ins-completion-menu|
opt.tabstop = 4 -- insert 4 spaces for a tab
opt.cursorline = O.cursorline -- highlight the current line
opt.number = O.number -- set numbered lines
opt.relativenumber = O.relative_number -- set relative numbered lines
opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
opt.wrap = O.wrap_lines -- display lines as one long line
opt.backup = false -- creates a backup file
opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
opt.cmdheight = 2 -- more space in the neovim command line for displaying messages
opt.colorcolumn = "99999" -- fix indentline for now
opt.completeopt = { "menuone", "noselect" }
opt.conceallevel = 0 -- so that `` is visible in markdown files
opt.fileencoding = "utf-8" -- the encoding written to a file
opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
opt.hidden = O.hidden_files -- required to keep multiple buffers and open multiple buffers
opt.hlsearch = O.hl_search -- highlight all matches on previous search pattern
opt.ignorecase = O.ignore_case -- ignore case in search patterns
opt.mouse = "a" -- allow the mouse to be used in neovim
opt.pumheight = 10 -- pop up menu height
opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
opt.showtabline = 2 -- always show tabs
opt.smartcase = O.smart_case -- smart case
opt.smartindent = true -- make indenting smarter again
opt.splitbelow = true -- force all horizontal splits to go below current window
opt.splitright = true -- force all vertical splits to go to the right of current window
opt.swapfile = false -- creates a swapfile
opt.termguicolors = true -- set term gui colors (most terminals support this)
opt.timeoutlen = O.timeoutlen -- time to wait for a mapped sequence to complete (in milliseconds)
opt.title = true -- set the title of window to the value of the titlestring
opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
opt.undodir = CACHE_PATH .. "/undo" -- set an undo directory
opt.undofile = true -- enable persisten undo
opt.updatetime = 300 -- faster completion
opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
opt.expandtab = true -- convert tabs to spaces
opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
opt.shortmess:append "c"
opt.tabstop = 4 -- insert 4 spaces for a tab
opt.cursorline = O.cursorline -- highlight the current line
opt.number = O.number -- set numbered lines
opt.relativenumber = O.relative_number -- set relative numbered lines
opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
opt.wrap = O.wrap_lines -- display lines as one long line

View file

@ -5,16 +5,17 @@ Formatters and linters should be
filled in as strings with either
a global executable or a path to
an executable
]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- general
O.auto_complete = true
O.colorscheme = 'spacegray'
O.colorscheme = "spacegray"
O.auto_close_tree = 0
O.wrap_lines = false
O.timeoutlen = 100
O.document_highlight = true
O.extras = false
O.leader_key = ' '
O.leader_key = " "
O.ignore_case = true
O.smart_case = true
O.lushmode = false
@ -38,7 +39,7 @@ O.plugin.zen.active = false
-- if you don't want all the parsers change this to a table of the ones you want
O.treesitter.ensure_installed = "all"
O.treesitter.ignore_install = {"haskell"}
O.treesitter.ignore_install = { "haskell" }
O.treesitter.highlight.enabled = true
O.lang.clang.diagnostics.virtual_text = true
@ -49,7 +50,7 @@ O.lang.clang.diagnostics.underline = true
-- add things like O.python.formatter.yapf.exec_path
-- add things like O.python.linter.flake8.exec_path
-- add things like O.python.formatter.isort.exec_path
O.lang.python.formatter = 'yapf'
O.lang.python.formatter = "yapf"
-- O.python.linter = 'flake8'
O.lang.python.isort = true
O.lang.python.autoformat = true
@ -60,15 +61,14 @@ O.lang.python.analysis.type_checking = "off"
O.lang.python.analysis.auto_search_paths = true
O.lang.python.analysis.use_library_code_types = true
-- lua
-- TODO look into stylua
O.lang.lua.formatter = 'lua-format'
O.lang.lua.formatter = "lua-format"
-- O.lua.formatter = 'lua-format'
O.lang.lua.autoformat = false
-- javascript
O.lang.tsserver.formatter = 'prettier'
O.lang.tsserver.formatter = "prettier"
O.lang.tsserver.linter = nil
O.lang.tsserver.autoformat = true
@ -94,7 +94,7 @@ O.lang.php.environment.php_version = "7.4"
O.lang.php.autoformat = false
O.lang.php.diagnostics.signs = true
O.lang.php.diagnostics.underline = true
O.lang.php.filetypes = { "php", "phtml" }
O.lang.php.filetypes = { "php", "phtml" }
-- TODO Autocommands
-- https://neovim.io/doc/user/autocmd.html
@ -102,4 +102,3 @@ O.lang.php.filetypes = { "php", "phtml" }
-- TODO Additional Plugins
-- TODO User Config for plugins

View file

@ -42,7 +42,7 @@
--
-- `:lua require('lush').ify()`
local lush = require('lush')
local lush = require "lush"
local hsl = lush.hsl
local theme = lush(function()
@ -101,7 +101,7 @@ local theme = lush(function()
-- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
-- Search { }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
-- SpecialKey { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
-- SpellBad { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
-- SpellBad { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
-- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
-- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
-- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
@ -260,7 +260,6 @@ local theme = lush(function()
-- TSTitle { }; -- Text that is part of a title.
-- TSLiteral { }; -- Literal text.
-- TSURI { }; -- Any URI like a link or email.
}
end)