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:
Arkaprabha Chakraborty
2023-06-09 06:38:22 +05:30
parent 177157d404
commit f00e435d4e
11 changed files with 283 additions and 104 deletions

View File

@@ -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,
})