update vim config with telescope

This commit is contained in:
ksyasuda
2022-10-27 17:28:20 -07:00
parent bb361c8aa2
commit 227a06e002
11 changed files with 303 additions and 75 deletions

View File

@@ -35,7 +35,7 @@ require('bufferline').setup {
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
tab_size = 18,
-- diagnostics = false | "nvim_lsp" | "coc",
diagnostics = "coc",
diagnostics = "nvim_lsp",
diagnostics_update_in_insert = false,
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "

View File

@@ -1,27 +1,57 @@
require('doom-one').setup({
cursor_coloring = false,
terminal_colors = false,
italic_comments = false,
enable_treesitter = true,
transparent_background = false,
pumblend = {
enable = true,
transparency_amount = 20,
},
plugins_integrations = {
neorg = true,
barbar = true,
bufferline = false,
gitgutter = false,
gitsigns = true,
telescope = false,
neogit = true,
nvim_tree = true,
dashboard = true,
startify = true,
whichkey = true,
indent_blankline = true,
vim_illuminate = true,
lspsaga = false,
},
})
-- require('doom-one').setup({
-- cursor_coloring = false,
-- terminal_colors = false,
-- italic_comments = false,
-- enable_treesitter = true,
-- transparent_background = false,
-- pumblend = {
-- enable = true,
-- transparency_amount = 20,
-- },
-- plugins_integrations = {
-- neorg = true,
-- barbar = true,
-- bufferline = false,
-- gitgutter = false,
-- gitsigns = true,
-- telescope = false,
-- neogit = true,
-- nvim_tree = true,
-- dashboard = true,
-- startify = true,
-- whichkey = true,
-- indent_blankline = true,
-- vim_illuminate = true,
-- lspsaga = false,
-- },
-- })
vim.g.doom_one_cursor_coloring = true
-- Set :terminal colors
vim.g.doom_one_terminal_colors = true
-- Enable italic comments
vim.g.doom_one_italic_comments = false
-- Enable TS support
vim.g.doom_one_enable_treesitter = true
-- Color whole diagnostic text or only underline
vim.g.doom_one_diagnostics_text_color = true
-- Enable transparent background
vim.g.doom_one_transparent_background = false
-- Pumblend transparency
vim.g.doom_one_pumblend_enable = false
vim.g.doom_one_pumblend_transparency = 20
-- Plugins integration
vim.g.doom_one_plugin_neorg = true
vim.g.doom_one_plugin_barbar = false
vim.g.doom_one_plugin_telescope = false
vim.g.doom_one_plugin_neogit = true
vim.g.doom_one_plugin_nvim_tree = true
vim.g.doom_one_plugin_dashboard = true
vim.g.doom_one_plugin_startify = true
vim.g.doom_one_plugin_whichkey = true
vim.g.doom_one_plugin_indent_blankline = true
vim.g.doom_one_plugin_vim_illuminate = true
vim.g.doom_one_plugin_lspsaga = false

View File

@@ -196,4 +196,21 @@ for _, lsp in pairs(servers) do
}
end
local plugins_path = vim.fn.stdpath("data") .. "site/autoload/plug.vim"
local dir_list = vim.fn.glob(plugins_path .. "/*", true, true)
local library_table = {}
for _, v in ipairs(dir_list) do
library_table[v .. "/lua"] = true
end
library_table[vim.fn.expand("$VIMRUNTIME/lua")] = true
library_table[vim.fn.stdpath("config") .. "/lua"] = true
require('lspconfig').sumneko_lua.setup({
settings = {
Lua = {
diagnostics = { globals = { "vim" } },
workspace = { library = library_table },
},
},
})
-- require 'lspconfig'.bashls.setup {}

View File

@@ -3,7 +3,7 @@ local cmp = require 'cmp'
local lspkind = require('lspkind')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- luasnip setup
local luasnip = require 'luasnip'

View File

@@ -0,0 +1,6 @@
require("docs-view").setup {
-- position = "right",
-- width = 90,
position = "bottom",
height = 20,
}

View File

@@ -40,7 +40,7 @@ require 'nvim-tree'.setup {
},
view = {
width = 35,
height = 35,
-- height = 35,
hide_root_folder = false,
side = 'left',
-- auto_resize = false,

View File

@@ -1,21 +1,12 @@
local onedarkpro = require("onedarkpro")
onedarkpro.setup({
-- Theme can be overwritten with 'onedark' or 'onelight' as a string!
-- theme = function()
-- if vim.o.background == "dark" then
-- return "onedark"
-- else
-- return "onelight"
-- end
-- end,
theme = "onedark",
colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
hlgroups = {}, -- Override default highlight groups
-- colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
-- hlgroups = {}, -- Override default highlight groups
plugins = { -- Override which plugins highlight groups are loaded
native_lsp = true,
polygot = true,
treesitter = true,
-- Others omitted for brevity
},
styles = {
comments = "italic",

View File

@@ -0,0 +1,43 @@
require('telescope').setup{
defaults = {
-- Default configuration for telescope goes here:
-- config_key = value,
layout_strategy = 'flex',
width = 0.9,
wrap_results = true,
preview = {
border = true,
borderchars = { '', '', '', '', '', '', '', '' },
title = true,
dynamic_preview_title = true,
treesitter = true,
},
mappings = {
i = {
-- map actions.which_key to <C-h> (default: <C-/>)
-- actions.which_key shows the mappings for your picker,
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
["<C-h>"] = "which_key"
}
}
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
find_files = {
-- theme = "dropdown"
}
},
extensions = {
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
}
}