A fuckton of plugins
This commit is contained in:
parent
7d70eda7a6
commit
4619fdd802
22
lua/lsp.lua
22
lua/lsp.lua
@ -1,9 +1,21 @@
|
|||||||
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
end
|
||||||
|
|
||||||
local lsp_installer = require("nvim-lsp-installer")
|
local lsp_installer = require("nvim-lsp-installer")
|
||||||
lsp_installer.on_server_ready(function(server)
|
lsp_installer.on_server_ready(function(server)
|
||||||
local opts = {}
|
local opts = {
|
||||||
server:setup {
|
capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||||
-- capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
capabilities = require("coq").lsp_ensure_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
}
|
}
|
||||||
vim.cmd [[ do User LspAttachBuffers ]]
|
if server.name == "rust_analyzer" then
|
||||||
|
require("rust-tools").setup{
|
||||||
|
server = vim.tbl_deep_extend("force", server:get_default_options(), opts),
|
||||||
|
}
|
||||||
|
server:attach_buffers()
|
||||||
|
else
|
||||||
|
server:setup(opts)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
26
lua/maps.lua
26
lua/maps.lua
@ -44,17 +44,19 @@ map("n", "<leader>bh", "::BufferLineMovePrev<CR>")
|
|||||||
map("n", "<leader>nt", ":NvimTreeToggle<CR>")
|
map("n", "<leader>nt", ":NvimTreeToggle<CR>")
|
||||||
|
|
||||||
|
|
||||||
-- Telescop.
|
-- Telescope
|
||||||
map("n", "<Leader>tw", ":Telescope live_grep<CR>")
|
map("n", "<Leader>tw", ":Telescope live_grep<CR>")
|
||||||
map("n", "<Leader>gs", ":Telescope git_status<CR>")
|
map("n", "<Leader>gs", ":Telescope git_status<CR>")
|
||||||
map("n", "<Leader>gc", ":Telescope git_commits<CR>")
|
map("n", "<Leader>gc", ":Telescope git_commits<CR>")
|
||||||
|
map("n", "<Leader>gb", ":Telescope git_branches<CR>")
|
||||||
map("n", "<Leader>tf", ":Telescope find_files find_command=rg,--follow,--hidden,--files<CR>")
|
map("n", "<Leader>tf", ":Telescope find_files find_command=rg,--follow,--hidden,--files<CR>")
|
||||||
map("n", "<Leader>td", ":Telescope find_directories<CR>")
|
map("n", "<Leader>td", ":Telescope find_directories<CR>")
|
||||||
map("n", "<Leader>tp", ":Telescope media_files<CR>")
|
map("n", "<Leader>tp", ":Telescope media_files<CR>")
|
||||||
map("n", "<Leader>tb", ":Telescope buffers<CR>")
|
map("n", "<Leader>tb", ":Telescope buffers<CR>")
|
||||||
map("n", "<Leader>th", ":Telescope help_tags<CR>")
|
map("n", "<Leader>th", ":Telescope help_tags<CR>")
|
||||||
map("n", "<Leader>to", ":Telescope oldfiles<CR>")
|
map("n", "<Leader>to", ":Telescope oldfiles<CR>")
|
||||||
map("n", "<Leader>tc", ":Telescope colorscheme<CR>")
|
map("n", "<Leader>tt", ":Telescope treesitter<CR>")
|
||||||
|
map("n", "<leader>tc", ":Telescope neoclip default<CR>")
|
||||||
|
|
||||||
|
|
||||||
-- Dashboard
|
-- Dashboard
|
||||||
@ -79,10 +81,10 @@ map("n", "<leader>lT", ":lua vim.lsp.buf.type_definition()<CR>", lsp_opts)
|
|||||||
map("n", "<leader>ln", ":lua vim.lsp.buf.rename()<CR>", lsp_opts)
|
map("n", "<leader>ln", ":lua vim.lsp.buf.rename()<CR>", lsp_opts)
|
||||||
map("n", "<leader>lc", ":lua vim.lsp.buf.code_action()<CR>", lsp_opts)
|
map("n", "<leader>lc", ":lua vim.lsp.buf.code_action()<CR>", lsp_opts)
|
||||||
map("n", "<leader>lr", ":lua vim.lsp.buf.references()<CR>", lsp_opts)
|
map("n", "<leader>lr", ":lua vim.lsp.buf.references()<CR>", lsp_opts)
|
||||||
map("n", "<leader>le", ":lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", lsp_opts)
|
map("n", "<leader>le", ":Telescope diagnostics bufnr=0", lsp_opts)
|
||||||
map("n", "[d", ":lua vim.lsp.diagnostic.goto_prev()<CR>", lsp_opts)
|
map("n", "[", ":lua vim.lsp.diagnostic.goto_prev()<CR>", lsp_opts)
|
||||||
map("n", "]d", ":lua vim.lsp.diagnostic.goto_next()<CR>", lsp_opts)
|
map("n", "]", ":lua vim.lsp.diagnostic.goto_next()<CR>", lsp_opts)
|
||||||
map("n", "<leader>lq", ":lua vim.lsp.diagnostic.set_loclist()<CR>", lsp_opts)
|
map("n", "<leader>lq", ":Telescope diagnostics bufnr=0<CR>", lsp_opts)
|
||||||
|
|
||||||
|
|
||||||
-- Dap
|
-- Dap
|
||||||
@ -125,10 +127,6 @@ vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()")
|
|||||||
map("n", "<leader>cw", ":StripWhitespace<CR>")
|
map("n", "<leader>cw", ":StripWhitespace<CR>")
|
||||||
|
|
||||||
|
|
||||||
-- TrueZen focus mode.
|
|
||||||
map("n", "<leader>fs", ":TZFocus<CR>")
|
|
||||||
|
|
||||||
|
|
||||||
-- comment
|
-- comment
|
||||||
map("n", "<leader>/", ":CommentToggle<CR>")
|
map("n", "<leader>/", ":CommentToggle<CR>")
|
||||||
map("v", "<leader>/", ":'<,'>CommentToggle<CR>")
|
map("v", "<leader>/", ":'<,'>CommentToggle<CR>")
|
||||||
@ -136,3 +134,11 @@ map("v", "<leader>/", ":'<,'>CommentToggle<CR>")
|
|||||||
|
|
||||||
-- Code formatter.
|
-- Code formatter.
|
||||||
map("n", "<leader>fr", ":Neoformat<CR>", lsp_opts)
|
map("n", "<leader>fr", ":Neoformat<CR>", lsp_opts)
|
||||||
|
|
||||||
|
-- Searchbox.nvim
|
||||||
|
map("n", "<leader>sf", ":SearchBoxIncSearch<CR>")
|
||||||
|
map("n", "<leader>sF", ":SearchBoxIncSearch reverse=true<CR>")
|
||||||
|
map("n", "<leader>sr", ":SearchBoxReplace<CR>")
|
||||||
|
|
||||||
|
-- Cheatsheet.nvim
|
||||||
|
map("n", "<leader>?", ":Cheatsheet<CR>")
|
||||||
|
@ -137,32 +137,39 @@ return require("packer").startup({function()
|
|||||||
|
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope-fzf-native.nvim", run = "make",
|
"nvim-telescope/telescope-fzf-native.nvim", run = "make",
|
||||||
cmd = "Telescope"
|
|
||||||
}
|
}
|
||||||
local os = vim.loop.os_uname().sysname
|
use {
|
||||||
if os == "Linux" then
|
"nvim-lua/popup.nvim",
|
||||||
use {
|
}
|
||||||
"nvim-lua/popup.nvim",
|
use {
|
||||||
cmd = "Telescope"
|
"nvim-telescope/telescope-media-files.nvim",
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope-media-files.nvim",
|
"artart222/telescope_find_directories",
|
||||||
cmd = "Telescope"
|
}
|
||||||
}
|
|
||||||
use {
|
|
||||||
"artart222/telescope_find_directories",
|
|
||||||
cmd = "Telescope"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
use {
|
|
||||||
"artart222/telescope_find_directories",
|
|
||||||
}
|
|
||||||
end
|
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/telescope")
|
local telescope = require("telescope")
|
||||||
|
|
||||||
|
telescope.setup {
|
||||||
|
extensions = {
|
||||||
|
media_files = {
|
||||||
|
filetypes = { "png", "webp", "jpg", "jpeg" },
|
||||||
|
find_cmd = "rg"
|
||||||
|
},
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = "smart_case",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
telescope.load_extension("media_files")
|
||||||
|
telescope.load_extension("find_directories")
|
||||||
|
telescope.load_extension("fzf")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,10 +188,7 @@ return require("packer").startup({function()
|
|||||||
|
|
||||||
use {
|
use {
|
||||||
"simrat39/rust-tools.nvim",
|
"simrat39/rust-tools.nvim",
|
||||||
after = "nvim-lsp-installer",
|
after = "nvim-lspconfig"
|
||||||
config = function()
|
|
||||||
require("rust-tools").setup({})
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
@ -402,11 +406,51 @@ return require("packer").startup({function()
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"matze/vim-move"
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"stevearc/dressing.nvim"
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"VonHeikemen/searchbox.nvim",
|
||||||
|
requires = {
|
||||||
|
{ "MunifTanjim/nui.nvim" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"sudormrfbin/cheatsheet.nvim",
|
||||||
|
|
||||||
|
requires = {
|
||||||
|
{"nvim-telescope/telescope.nvim"},
|
||||||
|
{"nvim-lua/popup.nvim"},
|
||||||
|
{"nvim-lua/plenary.nvim"},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("cheatsheet").setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"AckslD/nvim-neoclip.lua",
|
||||||
|
requires = {"tami5/sqlite.lua", module = "sqlite"},
|
||||||
|
config = function()
|
||||||
|
require("neoclip").setup({
|
||||||
|
enable_persistant_history = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
for key, plugin in pairs(additional_plugins) do
|
for key, plugin in pairs(additional_plugins) do
|
||||||
if type(plugin) == "string" then
|
if type(plugin) == "string" then
|
||||||
use { plugin }
|
use { plugin }
|
||||||
else
|
else
|
||||||
use { unpack(plugin) }
|
use { unpack(plugin) }
|
||||||
|
select = ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ local lualine_styles = {
|
|||||||
|
|
||||||
lualine.setup {
|
lualine.setup {
|
||||||
options = {
|
options = {
|
||||||
theme = "spaceduck",
|
theme = "auto",
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
local present, telescope = pcall(require, "telescope")
|
|
||||||
if not present then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local os = vim.loop.os_uname().sysname
|
|
||||||
if os == "Linux" then
|
|
||||||
telescope.setup {
|
|
||||||
extensions = {
|
|
||||||
media_files = {
|
|
||||||
filetypes = { "png", "webp", "jpg", "jpeg" },
|
|
||||||
find_cmd = "rg"
|
|
||||||
},
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true,
|
|
||||||
override_generic_sorter = true,
|
|
||||||
override_file_sorter = true,
|
|
||||||
case_mode = "smart_case",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
telescope.load_extension("media_files")
|
|
||||||
telescope.load_extension("find_directories")
|
|
||||||
telescope.load_extension("fzf")
|
|
||||||
else
|
|
||||||
telescope.setup {
|
|
||||||
extensions = {
|
|
||||||
fzf = {
|
|
||||||
fuzzy = true,
|
|
||||||
override_generic_sorter = true,
|
|
||||||
override_file_sorter = true,
|
|
||||||
case_mode = "smart_case",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
telescope.load_extension("fzf")
|
|
||||||
telescope.load_extension("find_directories")
|
|
||||||
end
|
|
@ -15,7 +15,7 @@ vim.g.onedark_style = "deep" -- styles: dark, darker, cool, deep, warm and w
|
|||||||
vim.g.enfocado_style = "nature" -- styles: nature and neon.
|
vim.g.enfocado_style = "nature" -- styles: nature and neon.
|
||||||
vim.g.neon_style = "dark"
|
vim.g.neon_style = "dark"
|
||||||
vim.g.material_style = "deep ocean"
|
vim.g.material_style = "deep ocean"
|
||||||
vim.cmd("colorscheme spaceduck")
|
vim.cmd("colorscheme tokyonight")
|
||||||
|
|
||||||
function _G.make_codeart_transparent()
|
function _G.make_codeart_transparent()
|
||||||
vim.cmd("highlight Normal guibg=NONE guifg=NONE")
|
vim.cmd("highlight Normal guibg=NONE guifg=NONE")
|
||||||
|
Loading…
Reference in New Issue
Block a user