mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
Merge branch 'master' of github.com:ChristianChiarulli/LunarVim into rolling
This commit is contained in:
commit
9b1d18a1c1
40 changed files with 550 additions and 412 deletions
23
README.md
23
README.md
|
@ -52,12 +52,12 @@ O.timeoutlen = 100
|
||||||
O.leader_key = ' '
|
O.leader_key = ' '
|
||||||
|
|
||||||
-- After changing plugin config it is recommended to run :PackerCompile
|
-- After changing plugin config it is recommended to run :PackerCompile
|
||||||
O.plugin.hop.active = true
|
|
||||||
O.plugin.colorizer.active = true
|
O.plugin.colorizer.active = true
|
||||||
|
O.plugin.dashboard.active = true
|
||||||
|
O.plugin.floatterm.active = true
|
||||||
|
O.plugin.symbol_outline = true
|
||||||
O.plugin.trouble.active = true
|
O.plugin.trouble.active = true
|
||||||
O.plugin.lazygit.active = true
|
|
||||||
O.plugin.zen.active = true
|
O.plugin.zen.active = true
|
||||||
O.plugin.markdown_preview.active = true
|
|
||||||
|
|
||||||
-- if you don't want all the parsers change this to a table of the ones you want
|
-- 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.ensure_installed = "all"
|
||||||
|
@ -73,11 +73,20 @@ O.lang.tsserver.formatter = 'prettier'
|
||||||
O.lang.tsserver.linter = nil
|
O.lang.tsserver.linter = nil
|
||||||
O.lang.tsserver.autoformat = true
|
O.lang.tsserver.autoformat = true
|
||||||
|
|
||||||
-- json
|
-- python
|
||||||
O.lang.json.autoformat = true
|
-- O.python.linter = 'flake8'
|
||||||
|
O.lang.python.isort = true
|
||||||
|
O.lang.python.diagnostics.virtual_text = true
|
||||||
|
O.lang.python.analysis.use_library_code_types = true
|
||||||
|
|
||||||
-- Additional Plugins
|
-- Additional Plugins
|
||||||
-- O.user_plugins = {{"windwp/nvim-ts-autotag"}}
|
-- O.user_plugins = {
|
||||||
|
-- {"folke/tokyonight.nvim"}, {
|
||||||
|
-- "ray-x/lsp_signature.nvim",
|
||||||
|
-- config = function() require"lsp_signature".on_attach() end,
|
||||||
|
-- event = "InsertEnter"
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
|
||||||
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
|
-- Autocommands (https://neovim.io/doc/user/autocmd.html)
|
||||||
-- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
|
-- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
|
||||||
|
@ -112,7 +121,7 @@ To update plugins:
|
||||||
|
|
||||||
To update LunarVim:
|
To update LunarVim:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cd ~/.config/nvim && git pull
|
cd ~/.config/nvim && git pull
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "clangd" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local clangd_flags = { "--background-index" }
|
local clangd_flags = { "--background-index" }
|
||||||
|
|
||||||
if O.lang.clang.cross_file_rename then
|
if O.lang.clang.cross_file_rename then
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "cmake" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").cmake.setup {
|
require("lspconfig").cmake.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/cmake/venv/bin/cmake-language-server" },
|
cmd = { DATA_PATH .. "/lspinstall/cmake/venv/bin/cmake-language-server" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "omnisharp" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- C# language server (csharp/OmniSharp) setup
|
-- C# language server (csharp/OmniSharp) setup
|
||||||
require("lspconfig").omnisharp.setup{
|
require("lspconfig").omnisharp.setup {
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
root_dir = require("lspconfig").util.root_pattern(".sln",".git"),
|
root_dir = require("lspconfig").util.root_pattern(".sln", ".git"),
|
||||||
cmd = { DATA_PATH .. "/lspinstall/csharp/omnisharp/run", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
|
cmd = { DATA_PATH .. "/lspinstall/csharp/omnisharp/run", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
-- npm install -g vscode-css-languageserver-bin
|
if not require("lv-utils").check_lsp_client_active "cssls" then
|
||||||
require("lspconfig").cssls.setup {
|
-- npm install -g vscode-css-languageserver-bin
|
||||||
|
require("lspconfig").cssls.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
"node",
|
"node",
|
||||||
DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
|
DATA_PATH .. "/lspinstall/css/vscode-css/css-language-features/server/dist/node/cssServerMain.js",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
},
|
},
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "dartls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").dartls.setup {
|
require("lspconfig").dartls.setup {
|
||||||
cmd = { "dart", O.lang.dart.sdk_path, "--lsp" },
|
cmd = { "dart", O.lang.dart.sdk_path, "--lsp" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "dockerls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- npm install -g dockerfile-language-server-nodejs
|
-- npm install -g dockerfile-language-server-nodejs
|
||||||
require("lspconfig").dockerls.setup {
|
require("lspconfig").dockerls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio" },
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "elixirls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").elixirls.setup {
|
require("lspconfig").elixirls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "elmls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").elmls.setup {
|
require("lspconfig").elmls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
|
cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
|
||||||
init_options = {
|
init_options = {
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "elixirls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- TODO Remove this at some point
|
-- TODO Remove this at some point
|
||||||
require("lspconfig").elixirls.setup {
|
require("lspconfig").elixirls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
require("lspconfig").gopls.setup {
|
if not require("lv-utils").check_lsp_client_active "gopls" then
|
||||||
|
require("lspconfig").gopls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/go/gopls" },
|
cmd = { DATA_PATH .. "/lspinstall/go/gopls" },
|
||||||
settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } },
|
settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } },
|
||||||
root_dir = require("lspconfig").util.root_pattern(".git", "go.mod"),
|
root_dir = require("lspconfig").util.root_pattern(".git", "go.mod"),
|
||||||
init_options = { usePlaceholders = true, completeUnimported = true },
|
init_options = { usePlaceholders = true, completeUnimported = true },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
vim.opt_local.tabstop = 4
|
vim.opt_local.tabstop = 4
|
||||||
vim.opt_local.shiftwidth = 4
|
vim.opt_local.shiftwidth = 4
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "graphql" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- npm install -g graphql-language-service-cli
|
-- 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 }
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
-- npm install -g vscode-html-languageserver-bin
|
if not require("lv-utils").check_lsp_client_active "html" then
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
-- npm install -g vscode-html-languageserver-bin
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
require("lspconfig").html.setup {
|
require("lspconfig").html.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
"node",
|
"node",
|
||||||
DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
|
DATA_PATH .. "/lspinstall/html/vscode-html/html-language-features/server/dist/node/htmlServerMain.js",
|
||||||
|
@ -10,5 +11,7 @@ require("lspconfig").html.setup {
|
||||||
},
|
},
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "jdtls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local util = require "lspconfig/util"
|
local util = require "lspconfig/util"
|
||||||
-- In Vimscript
|
-- In Vimscript
|
||||||
-- augroup lsp
|
-- augroup lsp
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
-- npm install -g typescript typescript-language-server
|
if not require("lv-utils").check_lsp_client_active "tsserver" then
|
||||||
-- require'snippets'.use_suggested_mappings()
|
-- npm install -g typescript typescript-language-server
|
||||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
-- require'snippets'.use_suggested_mappings()
|
||||||
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
-- local on_attach_common = function(client)
|
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
||||||
-- print("LSP Initialized")
|
-- local on_attach_common = function(client)
|
||||||
-- require'completion'.on_attach(client)
|
-- print("LSP Initialized")
|
||||||
-- require'illuminate'.on_attach(client)
|
-- require'completion'.on_attach(client)
|
||||||
-- end
|
-- require'illuminate'.on_attach(client)
|
||||||
require("lspconfig").tsserver.setup {
|
-- end
|
||||||
|
require("lspconfig").tsserver.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
|
@ -33,6 +34,8 @@ require("lspconfig").tsserver.setup {
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
require("lsp.ts-fmt-lint").setup()
|
require("lsp.ts-fmt-lint").setup()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
-- npm install -g typescript typescript-language-server
|
if not require("lv-utils").check_lsp_client_active "tsserver" then
|
||||||
-- require'snippets'.use_suggested_mappings()
|
-- npm install -g typescript typescript-language-server
|
||||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
-- require'snippets'.use_suggested_mappings()
|
||||||
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
-- local on_attach_common = function(client)
|
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
||||||
-- print("LSP Initialized")
|
-- local on_attach_common = function(client)
|
||||||
-- require'completion'.on_attach(client)
|
-- print("LSP Initialized")
|
||||||
-- require'illuminate'.on_attach(client)
|
-- require'completion'.on_attach(client)
|
||||||
-- end
|
-- require'illuminate'.on_attach(client)
|
||||||
require("lspconfig").tsserver.setup {
|
-- end
|
||||||
|
require("lspconfig").tsserver.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
|
@ -33,6 +34,8 @@ require("lspconfig").tsserver.setup {
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
require("lsp.ts-fmt-lint").setup()
|
require("lsp.ts-fmt-lint").setup()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "jsonls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- npm install -g vscode-json-languageserver
|
-- npm install -g vscode-json-languageserver
|
||||||
require("lspconfig").jsonls.setup {
|
require("lspconfig").jsonls.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "kotlin_language_server" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
--- default config for gradle-projects of the
|
--- default config for gradle-projects of the
|
||||||
--- kotlin-language-server: https://github.com/fwcd/kotlin-language-server
|
--- kotlin-language-server: https://github.com/fwcd/kotlin-language-server
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
if not require("lv-utils").check_lsp_client_active "sumneko_lua" then
|
||||||
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
|
||||||
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
local sumneko_root_path = DATA_PATH .. "/lspinstall/lua"
|
||||||
|
local sumneko_binary = sumneko_root_path .. "/sumneko-lua-language-server"
|
||||||
|
|
||||||
require("lspconfig").sumneko_lua.setup {
|
require("lspconfig").sumneko_lua.setup {
|
||||||
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
|
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -28,7 +29,9 @@ require("lspconfig").sumneko_lua.setup {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if O.lang.lua.autoformat then
|
if O.lang.lua.autoformat then
|
||||||
require("lv-utils").define_augroups {
|
require("lv-utils").define_augroups {
|
||||||
_lua_autoformat = {
|
_lua_autoformat = {
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "intelephense" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").intelephense.setup {
|
require("lspconfig").intelephense.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -20,7 +20,8 @@ if O.lang.python.isort then
|
||||||
table.insert(python_arguments, isort)
|
table.insert(python_arguments, isort)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig").efm.setup {
|
if not require("lv-utils").check_lsp_client_active "efm" then
|
||||||
|
require("lspconfig").efm.setup {
|
||||||
-- init_options = {initializationOptions},
|
-- init_options = {initializationOptions},
|
||||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||||
init_options = { documentFormatting = true, codeAction = false },
|
init_options = { documentFormatting = true, codeAction = false },
|
||||||
|
@ -31,10 +32,12 @@ require("lspconfig").efm.setup {
|
||||||
python = python_arguments,
|
python = python_arguments,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
-- npm i -g pyright
|
if not require("lv-utils").check_lsp_client_active "pyright" then
|
||||||
require("lspconfig").pyright.setup {
|
-- npm i -g pyright
|
||||||
|
require("lspconfig").pyright.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
|
DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
|
@ -57,9 +60,10 @@ require("lspconfig").pyright.setup {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if O.plugin.debug.active and O.plugin.dap_install.active then
|
if O.plugin.debug.active and O.plugin.dap_install.active then
|
||||||
local dap_install = require("dap-install")
|
local dap_install = require "dap-install"
|
||||||
dap_install.config("python_dbg", {})
|
dap_install.config("python_dbg", {})
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "solargraph" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- If you are using rvm, make sure to change below configuration
|
-- If you are using rvm, make sure to change below configuration
|
||||||
require("lspconfig").solargraph.setup {
|
require("lspconfig").solargraph.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" },
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "rust_analyzer" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if O.lang.rust.rust_tools.active then
|
if O.lang.rust.rust_tools.active then
|
||||||
local opts = {
|
local opts = {
|
||||||
tools = { -- rust-tools options
|
tools = { -- rust-tools options
|
||||||
|
@ -28,11 +32,11 @@ if O.lang.rust.rust_tools.active then
|
||||||
|
|
||||||
-- prefix for parameter hints
|
-- prefix for parameter hints
|
||||||
-- default: "<-"
|
-- default: "<-"
|
||||||
parameter_hints_prefix = "<-",
|
parameter_hints_prefix = O.lang.rust.rust_tools.parameter_hints_prefix,
|
||||||
|
|
||||||
-- prefix for all the other hints (type, chaining)
|
-- prefix for all the other hints (type, chaining)
|
||||||
-- default: "=>"
|
-- default: "=>"
|
||||||
other_hints_prefix = "=>",
|
other_hints_prefix = O.lang.rust.rust_tools.other_hints_prefix,
|
||||||
|
|
||||||
-- whether to align to the lenght of the longest line in the file
|
-- whether to align to the lenght of the longest line in the file
|
||||||
max_len_align = false,
|
max_len_align = false,
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
-- npm i -g bash-language-server
|
if not require("lv-utils").check_lsp_client_active "bashls" then
|
||||||
require("lspconfig").bashls.setup {
|
-- npm i -g bash-language-server
|
||||||
|
require("lspconfig").bashls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
|
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
filetypes = { "sh", "zsh" },
|
filetypes = { "sh", "zsh" },
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
-- sh
|
-- sh
|
||||||
local sh_arguments = {}
|
local sh_arguments = {}
|
||||||
|
@ -19,7 +21,8 @@ if O.lang.sh.linter == "shellcheck" then
|
||||||
table.insert(sh_arguments, shellcheck)
|
table.insert(sh_arguments, shellcheck)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig").efm.setup {
|
if not require("lv-utils").check_lsp_client_active "efm" then
|
||||||
|
require("lspconfig").efm.setup {
|
||||||
-- init_options = {initializationOptions},
|
-- init_options = {initializationOptions},
|
||||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||||
init_options = { documentFormatting = true, codeAction = false },
|
init_options = { documentFormatting = true, codeAction = false },
|
||||||
|
@ -30,4 +33,5 @@ require("lspconfig").efm.setup {
|
||||||
sh = sh_arguments,
|
sh = sh_arguments,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "texlab" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").texlab.setup {
|
require("lspconfig").texlab.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/latex/texlab" },
|
cmd = { DATA_PATH .. "/lspinstall/latex/texlab" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "terraformls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
require("lspconfig").terraformls.setup {
|
require("lspconfig").terraformls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve" },
|
cmd = { DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
-- npm install -g typescript typescript-language-server
|
if not require("lv-utils").check_lsp_client_active "tsserver" then
|
||||||
-- require'snippets'.use_suggested_mappings()
|
-- npm install -g typescript typescript-language-server
|
||||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
-- require'snippets'.use_suggested_mappings()
|
||||||
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
-- local on_attach_common = function(client)
|
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
||||||
-- print("LSP Initialized")
|
-- local on_attach_common = function(client)
|
||||||
-- require'completion'.on_attach(client)
|
-- print("LSP Initialized")
|
||||||
-- require'illuminate'.on_attach(client)
|
-- require'completion'.on_attach(client)
|
||||||
-- end
|
-- require'illuminate'.on_attach(client)
|
||||||
require("lspconfig").tsserver.setup {
|
-- end
|
||||||
|
require("lspconfig").tsserver.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
|
@ -33,6 +34,8 @@ require("lspconfig").tsserver.setup {
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
require("lsp.ts-fmt-lint").setup()
|
require("lsp.ts-fmt-lint").setup()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
-- npm install -g typescript typescript-language-server
|
if not require("lv-utils").check_lsp_client_active "tsserver" then
|
||||||
-- require'snippets'.use_suggested_mappings()
|
-- npm install -g typescript typescript-language-server
|
||||||
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
-- require'snippets'.use_suggested_mappings()
|
||||||
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
-- local on_attach_common = function(client)
|
-- capabilities.textDocument.completion.completionItem.snippetSupport = true;
|
||||||
-- print("LSP Initialized")
|
-- local on_attach_common = function(client)
|
||||||
-- require'completion'.on_attach(client)
|
-- print("LSP Initialized")
|
||||||
-- require'illuminate'.on_attach(client)
|
-- require'completion'.on_attach(client)
|
||||||
-- end
|
-- require'illuminate'.on_attach(client)
|
||||||
require("lspconfig").tsserver.setup {
|
-- end
|
||||||
|
require("lspconfig").tsserver.setup {
|
||||||
cmd = {
|
cmd = {
|
||||||
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
DATA_PATH .. "/lspinstall/typescript/node_modules/.bin/typescript-language-server",
|
||||||
"--stdio",
|
"--stdio",
|
||||||
|
@ -33,6 +34,8 @@ require("lspconfig").tsserver.setup {
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
require("lsp.ts-fmt-lint").setup()
|
require("lsp.ts-fmt-lint").setup()
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd "setl ts=2 sw=2"
|
vim.cmd "setl ts=2 sw=2"
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "vimls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- npm install -g vim-language-server
|
-- npm install -g vim-language-server
|
||||||
require("lspconfig").vimls.setup {
|
require("lspconfig").vimls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/vim/node_modules/.bin/vim-language-server", "--stdio" },
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "vuels" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Vue language server configuration (vetur)
|
-- Vue language server configuration (vetur)
|
||||||
require("lspconfig").vuels.setup {
|
require("lspconfig").vuels.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/vue/node_modules/.bin/vls", "--stdio" },
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
if require("lv-utils").check_lsp_client_active "yamlls" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- npm install -g yaml-language-server
|
-- npm install -g yaml-language-server
|
||||||
require("lspconfig").yamlls.setup {
|
require("lspconfig").yamlls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio" },
|
cmd = { DATA_PATH .. "/lspinstall/yaml/node_modules/.bin/yaml-language-server", "--stdio" },
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
-- Because lspinstall don't support zig yet,
|
if not require("lv-utils").check_lsp_client_active "zls" then
|
||||||
-- So we need zls preset in global lib
|
-- Because lspinstall don't support zig yet,
|
||||||
-- Further custom install zls in
|
-- So we need zls preset in global lib
|
||||||
-- https://github.com/zigtools/zls/wiki/Downloading-and-Building-ZLS
|
-- Further custom install zls in
|
||||||
require("lspconfig").zls.setup {
|
-- 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"),
|
root_dir = require("lspconfig").util.root_pattern(".git", "build.zig", "zls.json"),
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
||||||
require("lv-utils").define_augroups {
|
require("lv-utils").define_augroups {
|
||||||
_zig_autoformat = {
|
_zig_autoformat = {
|
||||||
{ "BufEnter", "*.zig", ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")' },
|
{ "BufEnter", "*.zig", ':lua vim.api.nvim_buf_set_option(0, "commentstring", "// %s")' },
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
-- npm i -g bash-language-server
|
if not require("lv-utils").check_lsp_client_active "bashls" then
|
||||||
require("lspconfig").bashls.setup {
|
-- npm i -g bash-language-server
|
||||||
|
require("lspconfig").bashls.setup {
|
||||||
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
|
cmd = { DATA_PATH .. "/lspinstall/bash/node_modules/.bin/bash-language-server", "start" },
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
filetypes = { "sh", "zsh" },
|
filetypes = { "sh", "zsh" },
|
||||||
}
|
}
|
||||||
|
end
|
||||||
-- 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" },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- sh
|
-- sh
|
||||||
local sh_arguments = {}
|
local sh_arguments = {}
|
||||||
|
@ -24,7 +19,8 @@ if O.lang.sh.linter == "shellcheck" then
|
||||||
table.insert(sh_arguments, shellcheck)
|
table.insert(sh_arguments, shellcheck)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lspconfig").efm.setup {
|
if not require("lv-utils").check_lsp_client_active "efm" then
|
||||||
|
require("lspconfig").efm.setup {
|
||||||
-- init_options = {initializationOptions},
|
-- init_options = {initializationOptions},
|
||||||
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" },
|
||||||
init_options = { documentFormatting = true, codeAction = false },
|
init_options = { documentFormatting = true, codeAction = false },
|
||||||
|
@ -35,4 +31,5 @@ require("lspconfig").efm.setup {
|
||||||
sh = sh_arguments,
|
sh = sh_arguments,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|
1
init.lua
1
init.lua
|
@ -3,6 +3,7 @@ require "keymappings"
|
||||||
vim.cmd("luafile " .. CONFIG_PATH .. "/lv-config.lua")
|
vim.cmd("luafile " .. CONFIG_PATH .. "/lv-config.lua")
|
||||||
require "settings"
|
require "settings"
|
||||||
require "plugins"
|
require "plugins"
|
||||||
|
vim.g.colors_name = O.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs.
|
||||||
require "lv-utils"
|
require "lv-utils"
|
||||||
require "lv-treesitter"
|
require "lv-treesitter"
|
||||||
if O.plugin.dashboard.active then
|
if O.plugin.dashboard.active then
|
||||||
|
|
|
@ -8,6 +8,7 @@ O = {
|
||||||
auto_close_tree = 0,
|
auto_close_tree = 0,
|
||||||
auto_complete = true,
|
auto_complete = true,
|
||||||
colorscheme = "lunar",
|
colorscheme = "lunar",
|
||||||
|
clipboard = "unnamedplus",
|
||||||
hidden_files = true,
|
hidden_files = true,
|
||||||
wrap_lines = false,
|
wrap_lines = false,
|
||||||
number = true,
|
number = true,
|
||||||
|
@ -16,6 +17,7 @@ O = {
|
||||||
cmdheight = 2,
|
cmdheight = 2,
|
||||||
cursorline = true,
|
cursorline = true,
|
||||||
shell = "bash",
|
shell = "bash",
|
||||||
|
scrolloff = 0,
|
||||||
timeoutlen = 100,
|
timeoutlen = 100,
|
||||||
nvim_tree_disable_netrw = 0,
|
nvim_tree_disable_netrw = 0,
|
||||||
ignore_case = true,
|
ignore_case = true,
|
||||||
|
@ -99,68 +101,7 @@ O = {
|
||||||
},
|
},
|
||||||
|
|
||||||
lang = {
|
lang = {
|
||||||
python = {
|
cmake = {},
|
||||||
linter = "",
|
|
||||||
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 = {
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sh = {
|
|
||||||
-- @usage can be 'shellcheck'
|
|
||||||
linter = "",
|
|
||||||
-- @usage can be 'shfmt'
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tsserver = {
|
|
||||||
-- @usage can be 'eslint'
|
|
||||||
linter = "",
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
json = {
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tailwindcss = {
|
|
||||||
active = false,
|
|
||||||
filetypes = {
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"scss",
|
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
clang = {
|
clang = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
@ -170,32 +111,37 @@ O = {
|
||||||
cross_file_rename = true,
|
cross_file_rename = true,
|
||||||
header_insertion = "never",
|
header_insertion = "never",
|
||||||
},
|
},
|
||||||
ruby = {
|
css = {
|
||||||
diagnostics = {
|
virtual_text = true,
|
||||||
virtualtext = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
},
|
||||||
filetypes = { "rb", "erb", "rakefile", "ruby" },
|
dart = {
|
||||||
|
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
|
||||||
},
|
},
|
||||||
go = {},
|
docker = {},
|
||||||
|
efm = {},
|
||||||
|
elm = {},
|
||||||
|
emmet = { active = true },
|
||||||
elixir = {},
|
elixir = {},
|
||||||
vim = {},
|
graphql = {},
|
||||||
yaml = {},
|
go = {},
|
||||||
terraform = {},
|
html = {},
|
||||||
rust = {
|
java = {},
|
||||||
rust_tools = {
|
json = {
|
||||||
active = false,
|
diagnostics = {
|
||||||
},
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
linter = "",
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
kotlin = {},
|
||||||
|
latex = {},
|
||||||
|
lua = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
signs = true,
|
signs = true,
|
||||||
underline = true,
|
underline = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
svelte = {},
|
|
||||||
|
|
||||||
php = {
|
php = {
|
||||||
format = {
|
format = {
|
||||||
format = {
|
format = {
|
||||||
|
@ -212,19 +158,76 @@ O = {
|
||||||
},
|
},
|
||||||
filetypes = { "php", "phtml" },
|
filetypes = { "php", "phtml" },
|
||||||
},
|
},
|
||||||
latex = {},
|
python = {
|
||||||
kotlin = {},
|
linter = "",
|
||||||
html = {},
|
isort = false,
|
||||||
elm = {},
|
diagnostics = {
|
||||||
emmet = { active = true },
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
graphql = {},
|
signs = true,
|
||||||
efm = {},
|
underline = true,
|
||||||
docker = {},
|
|
||||||
cmake = {},
|
|
||||||
java = {},
|
|
||||||
css = {
|
|
||||||
virtual_text = true,
|
|
||||||
},
|
},
|
||||||
|
analysis = {
|
||||||
|
type_checking = "basic",
|
||||||
|
auto_search_paths = true,
|
||||||
|
use_library_code_types = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ruby = {
|
||||||
|
diagnostics = {
|
||||||
|
virtualtext = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
filetypes = { "rb", "erb", "rakefile", "ruby" },
|
||||||
|
},
|
||||||
|
rust = {
|
||||||
|
rust_tools = {
|
||||||
|
active = false,
|
||||||
|
parameter_hints_prefix = "<-",
|
||||||
|
other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
|
||||||
|
},
|
||||||
|
linter = "",
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sh = {
|
||||||
|
-- @usage can be 'shellcheck'
|
||||||
|
linter = "",
|
||||||
|
-- @usage can be 'shfmt'
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
svelte = {},
|
||||||
|
tailwindcss = {
|
||||||
|
active = false,
|
||||||
|
filetypes = {
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"scss",
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
terraform = {},
|
||||||
|
tsserver = {
|
||||||
|
-- @usage can be 'eslint'
|
||||||
|
linter = "",
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
vim = {},
|
||||||
|
yaml = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
dashboard = {
|
dashboard = {
|
||||||
|
|
|
@ -5,15 +5,15 @@ 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-l>", "<C-w>l", { silent = true })
|
||||||
|
|
||||||
-- Terminal window navigation
|
-- Terminal window navigation
|
||||||
vim.api.nvim_set_keymap("t", "<C-h>", "<C-\\<C-N><C-w>h", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("t", "<C-h>", "<C-\\><C-N><C-w>h", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("t", "<C-j>", "<C-\\<C-N><C-w>j", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("t", "<C-k>", "<C-\\<C-N><C-w>k", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("t", "<C-l>", "<C-\\<C-N><C-w>l", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("i", "<C-h>", "<C-\\<C-N><C-w>h", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("i", "<C-h>", "<C-\\><C-N><C-w>h", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("i", "<C-j>", "<C-\\<C-N><C-w>j", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("i", "<C-j>", "<C-\\><C-N><C-w>j", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("i", "<C-k>", "<C-\\<C-N><C-w>k", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("i", "<C-k>", "<C-\\><C-N><C-w>k", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("i", "<C-l>", "<C-\\<C-N><C-w>l", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("i", "<C-l>", "<C-\\><C-N><C-w>l", {silent = true, noremap = true})
|
||||||
vim.api.nvim_set_keymap("t", "<Esc>", "<C-\\<C-n>", {silent = true, noremap = true})
|
vim.api.nvim_set_keymap("t", "<Esc>", "<C-\\><C-n>", {silent = true, noremap = true})
|
||||||
|
|
||||||
-- TODO fix this
|
-- TODO fix this
|
||||||
-- resize with arrows
|
-- resize with arrows
|
||||||
|
|
|
@ -36,7 +36,7 @@ telescope.setup {
|
||||||
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||||
file_ignore_patterns = {},
|
file_ignore_patterns = {},
|
||||||
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
|
||||||
shorten_path = true,
|
path_display = {"shorten"},
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
border = {},
|
border = {},
|
||||||
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
|
||||||
|
|
|
@ -8,6 +8,16 @@ function lv_utils.reload_lv_config()
|
||||||
vim.cmd ":PackerInstall"
|
vim.cmd ":PackerInstall"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function lv_utils.check_lsp_client_active(name)
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
for _, client in pairs(clients) do
|
||||||
|
if client.name == name then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function lv_utils.define_augroups(definitions) -- {{{1
|
function lv_utils.define_augroups(definitions) -- {{{1
|
||||||
-- Create autocommand groups based on the passed definitions
|
-- Create autocommand groups based on the passed definitions
|
||||||
--
|
--
|
||||||
|
|
|
@ -84,6 +84,12 @@ vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true
|
||||||
-- close buffer
|
-- close buffer
|
||||||
vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
|
vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Save
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>w", ":w!<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Quit
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>q", ":q!<CR>", { noremap = true, silent = true })
|
||||||
|
|
||||||
-- open lv-config
|
-- open lv-config
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
|
@ -93,7 +99,8 @@ vim.api.nvim_set_keymap(
|
||||||
)
|
)
|
||||||
|
|
||||||
local mappings = {
|
local mappings = {
|
||||||
|
["w"] = "Save",
|
||||||
|
["q"] = "Quit",
|
||||||
["."] = "LunarConfig",
|
["."] = "LunarConfig",
|
||||||
["/"] = "Comment",
|
["/"] = "Comment",
|
||||||
["c"] = "Close Buffer",
|
["c"] = "Close Buffer",
|
||||||
|
|
|
@ -15,17 +15,13 @@ if O.transparent_window then
|
||||||
cmd "au ColorScheme * hi SignColumn ctermbg=none guibg=none"
|
cmd "au ColorScheme * hi SignColumn ctermbg=none guibg=none"
|
||||||
end
|
end
|
||||||
|
|
||||||
--- COLORSCHEME ---
|
|
||||||
|
|
||||||
vim.g.colors_name = O.colorscheme
|
|
||||||
|
|
||||||
--- SETTINGS ---
|
--- SETTINGS ---
|
||||||
|
|
||||||
opt.backup = false -- creates a backup file
|
opt.backup = false -- creates a backup file
|
||||||
opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
|
opt.clipboard = O.clipboard -- allows neovim to access the system clipboard
|
||||||
opt.cmdheight = O.cmdheight -- more space in the neovim command line for displaying messages
|
opt.cmdheight = O.cmdheight -- more space in the neovim command line for displaying messages
|
||||||
opt.colorcolumn = "99999" -- fix indentline for now
|
opt.colorcolumn = "99999" -- fix indentline for now
|
||||||
opt.completeopt = { "menuone", "noselect" }
|
opt.completeopt = {"menuone", "noselect"}
|
||||||
opt.conceallevel = 0 -- so that `` is visible in markdown files
|
opt.conceallevel = 0 -- so that `` is visible in markdown files
|
||||||
opt.fileencoding = "utf-8" -- the encoding written to a file
|
opt.fileencoding = "utf-8" -- the encoding written to a file
|
||||||
opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
|
opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
|
||||||
|
@ -34,6 +30,7 @@ opt.hlsearch = O.hl_search -- highlight all matches on previous search pattern
|
||||||
opt.ignorecase = O.ignore_case -- ignore case in search patterns
|
opt.ignorecase = O.ignore_case -- ignore case in search patterns
|
||||||
opt.mouse = "a" -- allow the mouse to be used in neovim
|
opt.mouse = "a" -- allow the mouse to be used in neovim
|
||||||
opt.pumheight = 10 -- pop up menu height
|
opt.pumheight = 10 -- pop up menu height
|
||||||
|
opt.scrolloff = O.scrolloff -- minimal number of screen lines to keep above and below the cursor
|
||||||
opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||||
opt.showtabline = 2 -- always show tabs
|
opt.showtabline = 2 -- always show tabs
|
||||||
opt.smartcase = O.smart_case -- smart case
|
opt.smartcase = O.smart_case -- smart case
|
||||||
|
|
Loading…
Reference in a new issue