Compare commits
2 Commits
808c59f8d7
...
4ecc34c716
Author | SHA1 | Date |
---|---|---|
|
4ecc34c716 | |
|
8d2b8a5765 |
|
@ -101,24 +101,6 @@ return { -- LSP Configuration & Plugins
|
||||||
vim.diagnostic.open_float(nil, { focus = false })
|
vim.diagnostic.open_float(nil, { focus = false })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP Specification.
|
|
||||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
|
||||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
||||||
--
|
|
||||||
-- Add any additional override configuration in the following tables. Available keys are:
|
|
||||||
-- - cmd (table): Override the default command used to start the server
|
|
||||||
-- - filetypes (table): Override the default list of associated filetypes for the server
|
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
||||||
--
|
|
||||||
--Pop-up border styling
|
--Pop-up border styling
|
||||||
local border = {
|
local border = {
|
||||||
{ "🭽", "FloatBorder" },
|
{ "🭽", "FloatBorder" },
|
||||||
|
@ -145,6 +127,24 @@ return { -- LSP Configuration & Plugins
|
||||||
severity_sort = false,
|
severity_sort = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
||||||
|
-- By default, Neovim doesn't support everything that is in the LSP Specification.
|
||||||
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
|
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||||
|
|
||||||
|
-- Enable the following language servers
|
||||||
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
|
--
|
||||||
|
-- Add any additional override configuration in the following tables. Available keys are:
|
||||||
|
-- - cmd (table): Override the default command used to start the server
|
||||||
|
-- - filetypes (table): Override the default list of associated filetypes for the server
|
||||||
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||||
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
|
--
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
|
|
|
@ -18,58 +18,33 @@ return { -- Collection of various small independent plugins/modules
|
||||||
|
|
||||||
-- ... and there is more!
|
-- ... and there is more!
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
-- require("mini.files").setup(
|
|
||||||
-- -- No need to copy this inside `setup()`. Will be used automatically.
|
|
||||||
-- {
|
|
||||||
-- -- Customization of shown content
|
|
||||||
-- content = {
|
|
||||||
-- -- Predicate for which file system entries to show
|
|
||||||
-- filter = nil,
|
|
||||||
-- -- What prefix to show to the left of file system entry
|
|
||||||
-- prefix = nil,
|
|
||||||
-- -- In which order to show file system entries
|
|
||||||
-- sort = nil,
|
|
||||||
-- },
|
|
||||||
--
|
|
||||||
-- -- Module mappings created only inside explorer.
|
|
||||||
-- -- Use `''` (empty string) to not create one.
|
|
||||||
-- mappings = {
|
|
||||||
-- close = "q",
|
|
||||||
-- go_in = "l",
|
|
||||||
-- go_in_plus = "L",
|
|
||||||
-- go_out = "h",
|
|
||||||
-- go_out_plus = "H",
|
|
||||||
-- reset = "<BS>",
|
|
||||||
-- reveal_cwd = "@",
|
|
||||||
-- show_help = "g?",
|
|
||||||
-- synchronize = "=",
|
|
||||||
-- trim_left = "<",
|
|
||||||
-- trim_right = ">",
|
|
||||||
-- },
|
|
||||||
--
|
|
||||||
-- -- General options
|
|
||||||
-- options = {
|
|
||||||
-- -- Whether to delete permanently or move into module-specific trash
|
|
||||||
-- permanent_delete = false,
|
|
||||||
-- -- Whether to use for editing directories
|
|
||||||
-- use_as_default_explorer = true,
|
|
||||||
-- },
|
|
||||||
--
|
|
||||||
-- -- Customization of explorer windows
|
|
||||||
-- windows = {
|
|
||||||
-- -- Maximum number of windows to show side by side
|
|
||||||
-- max_number = math.huge,
|
|
||||||
-- -- Whether to show preview of file/directory under cursor
|
|
||||||
-- preview = true,
|
|
||||||
-- -- Width of focused window
|
|
||||||
-- width_focus = 50,
|
|
||||||
-- -- Width of non-focused window
|
|
||||||
-- width_nofocus = 15,
|
|
||||||
-- -- Width of preview window
|
|
||||||
-- width_preview = 25,
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
-- )
|
|
||||||
require("mini.move").setup()
|
require("mini.move").setup()
|
||||||
|
-- require("mini.sessions").setup({
|
||||||
|
-- -- Whether to read latest session if Neovim opened without file arguments
|
||||||
|
-- autoread = true,
|
||||||
|
--
|
||||||
|
-- -- Whether to write current session before quitting Neovim
|
||||||
|
-- autowrite = true,
|
||||||
|
--
|
||||||
|
-- -- Directory where global sessions are stored (use `''` to disable)
|
||||||
|
-- -- directory = --<"session" subdir of user data directory from |stdpath()|>,
|
||||||
|
--
|
||||||
|
-- -- File for local session (use `''` to disable)
|
||||||
|
-- -- file = "Session.vim",
|
||||||
|
--
|
||||||
|
-- -- Whether to force possibly harmful actions (meaning depends on function)
|
||||||
|
-- force = { read = false, write = true, delete = false },
|
||||||
|
--
|
||||||
|
-- -- Hook functions for actions. Default `nil` means 'do nothing'.
|
||||||
|
-- hooks = {
|
||||||
|
-- -- Before successful action
|
||||||
|
-- pre = { read = nil, write = nil, delete = nil },
|
||||||
|
-- -- After successful action
|
||||||
|
-- post = { read = nil, write = nil, delete = nil },
|
||||||
|
-- },
|
||||||
|
--
|
||||||
|
-- -- Whether to print session path after action
|
||||||
|
-- verbose = { read = false, write = true, delete = true },
|
||||||
|
-- })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
return {
|
|
||||||
"coffebar/neovim-project",
|
|
||||||
opts = {
|
|
||||||
projects = { -- define project roots
|
|
||||||
"~/projects/*",
|
|
||||||
"~/.config/*",
|
|
||||||
"~/dev/*",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
-- enable saving the state of plugins in the session
|
|
||||||
vim.opt.sessionoptions:append("globals") -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
{ "nvim-telescope/telescope.nvim", tag = "0.1.4" },
|
|
||||||
{ "Shatur/neovim-session-manager" },
|
|
||||||
},
|
|
||||||
lazy = false,
|
|
||||||
priority = 100,
|
|
||||||
}
|
|
|
@ -0,0 +1 @@
|
||||||
|
return { "Shatur/neovim-session-manager" }
|
|
@ -7,7 +7,6 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
"nvim-telescope/telescope-symbols.nvim",
|
"nvim-telescope/telescope-symbols.nvim",
|
||||||
"jvgrootveld/telescope-zoxide",
|
"jvgrootveld/telescope-zoxide",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope-project.nvim",
|
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
@ -28,7 +27,6 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local project_actions = require("telescope._extensions.project.actions")
|
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
-- You can put your default mappings / updates / etc. in here
|
-- You can put your default mappings / updates / etc. in here
|
||||||
-- All the info you're looking for is in `:help telescope.setup()`
|
-- All the info you're looking for is in `:help telescope.setup()`
|
||||||
|
@ -51,24 +49,6 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
},
|
},
|
||||||
-- pickers = {},
|
-- pickers = {},
|
||||||
extensions = {
|
extensions = {
|
||||||
project = {
|
|
||||||
base_dirs = {
|
|
||||||
-- "~/dev/src",
|
|
||||||
-- { "~/dev/src2" },
|
|
||||||
-- { "~/dev/src3", max_depth = 4 },
|
|
||||||
-- { path = "~/dev/src4" },
|
|
||||||
-- { path = "~/dev/src5", max_depth = 2 },
|
|
||||||
},
|
|
||||||
hidden_files = true, -- default: false
|
|
||||||
theme = "dropdown",
|
|
||||||
order_by = "asc",
|
|
||||||
search_by = "title",
|
|
||||||
-- default for on_project_selected = find project files
|
|
||||||
-- on_project_selected = function(prompt_bufnr)
|
|
||||||
-- -- Do anything you want in here. For example:
|
|
||||||
-- project_actions.change_working_directory(prompt_bufnr, false)
|
|
||||||
-- end,
|
|
||||||
},
|
|
||||||
zoxide = {
|
zoxide = {
|
||||||
prompt_title = "[ Zoxide list ]",
|
prompt_title = "[ Zoxide list ]",
|
||||||
mappings = {
|
mappings = {
|
||||||
|
@ -124,7 +104,6 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
pcall(require("telescope").load_extension, "ui-select")
|
pcall(require("telescope").load_extension, "ui-select")
|
||||||
pcall(require("telescope").load_extension, "file_browser")
|
pcall(require("telescope").load_extension, "file_browser")
|
||||||
pcall(require("telescope").load_extension, "zoxide")
|
pcall(require("telescope").load_extension, "zoxide")
|
||||||
pcall(require("telescope").load_extension, "project")
|
|
||||||
pcall(require("telescope").load_extension, "harpoon")
|
pcall(require("telescope").load_extension, "harpoon")
|
||||||
pcall(require("telescope").load_extension, "harpoon")
|
pcall(require("telescope").load_extension, "harpoon")
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
|
@ -148,12 +127,12 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
||||||
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||||
vim.keymap.set("n", "<leader>sc", builtin.colorscheme, { desc = "[S]earch [C]olorscheme" })
|
vim.keymap.set("n", "<leader>sc", builtin.colorscheme, { desc = "[S]earch [C]olorscheme" })
|
||||||
vim.keymap.set(
|
-- vim.keymap.set(
|
||||||
"n",
|
-- "n",
|
||||||
"<leader>sp",
|
-- "<leader>sp",
|
||||||
"<cmd>:Telescope neovim-project discover<CR>",
|
-- "<cmd>:Telescope neovim-project discover<CR>",
|
||||||
{ desc = "[S]earch [P]rojects", noremap = true, silent = true }
|
-- { desc = "[S]earch [P]rojects", noremap = true, silent = true }
|
||||||
)
|
-- )
|
||||||
-- Slightly advanced example of overriding default behavior and theme
|
-- Slightly advanced example of overriding default behavior and theme
|
||||||
vim.keymap.set("n", "<leader>/", function()
|
vim.keymap.set("n", "<leader>/", function()
|
||||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
|
|
Loading…
Reference in New Issue