mirror of
https://github.com/arkorty/Neolite.git
synced 2026-03-18 00:57:12 +00:00
Commits:
Call the new plugins
Add gruvbox colorscheme
Turn off jump on jumpable for code snippets
Add git integration
Remove unnecessary keybinds
Change keybinds for LSP functions
Turn off format on buffer write
Add plugin sources
Remove 'help' from syntax highlighting
Add transparency option
Add visible indentations
Changes to be committed:
modified: init.lua
modified: lua/colorschemes.lua
modified: lua/completions.lua
new file: lua/git-integration.lua
modified: lua/keybinds.lua
modified: lua/lsp-config.lua
modified: lua/lsp-format.lua
modified: lua/plugins.lua
modified: lua/syntax-highlight.lua
new file: lua/transparency.lua
new file: lua/visible-indents.lua
This commit is contained in:
@@ -43,10 +43,48 @@ mason_lspconfig.setup_handlers({
|
||||
},
|
||||
})
|
||||
end,
|
||||
--["rust_analyzer"] = function()
|
||||
-- local rt_ok, rust_tools = pcall(require, "rust-tools")
|
||||
-- if rt_ok then
|
||||
-- rust_tools.setup({})
|
||||
-- end
|
||||
--end,
|
||||
["rust_analyzer"] = function()
|
||||
local rt_ok, rust_tools = pcall(require, "rust-tools")
|
||||
if rt_ok then
|
||||
rust_tools.setup({})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
vim.keymap.set("n", "<Leader>e", vim.diagnostic.open_float)
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
||||
vim.keymap.set("n", "<Leader>q", vim.diagnostic.setloclist)
|
||||
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set("n", "<Leader>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<Leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<Leader>wl", function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workLeader_folders()))
|
||||
end, opts)
|
||||
vim.keymap.set("n", "<Leader>D", vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<Leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user