diff --git a/lua/configs/indent-blankline.lua b/lua/configs/indent-blankline.lua index 5d8a36d..f9ec0d9 100644 --- a/lua/configs/indent-blankline.lua +++ b/lua/configs/indent-blankline.lua @@ -8,9 +8,9 @@ function M.config() vim.g.indentLine_enabled = 1 vim.g.indent_blankline_show_trailing_blankline_indent = false - vim.g.indent_blankline_show_first_indent_level = true + vim.g.indent_blankline_show_first_indent_level = false vim.g.indent_blankline_use_treesitter = true - vim.g.indent_blankline_show_current_context = true + vim.g.indent_blankline_show_current_context = false vim.g.indent_blankline_char = "▏" vim.g.indent_blankline_buftype_exclude = { "nofile", diff --git a/lua/configs/telescope.lua b/lua/configs/telescope.lua new file mode 100644 index 0000000..50bb861 --- /dev/null +++ b/lua/configs/telescope.lua @@ -0,0 +1,93 @@ +local M = {} + +function M.config() + local status_ok, telescope = pcall(require, "telescope") + if not status_ok then + return + end + + local actions = require "telescope.actions" + telescope.load_extension "fzf" + + telescope.setup { + defaults = { + + prompt_prefix = " ", + selection_caret = "❯ ", + path_display = { "smart" }, + + mappings = { + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.close, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + [""] = actions.complete_tag, + }, + + n = { + [""] = actions.close, + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + + ["j"] = actions.move_selection_next, + ["k"] = actions.move_selection_previous, + ["H"] = actions.move_to_top, + ["M"] = actions.move_to_middle, + ["L"] = actions.move_to_bottom, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + ["gg"] = actions.move_to_top, + ["G"] = actions.move_to_bottom, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + }, + }, + }, + pickers = {}, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, + } +end + +return M diff --git a/lua/keybinds.lua b/lua/keybinds.lua index 42ef392..31ceb81 100644 --- a/lua/keybinds.lua +++ b/lua/keybinds.lua @@ -29,3 +29,12 @@ map('n', 'o', 'NvimTreeFocus', opts) map('n', '/', 'lua require(\'Comment.api\').toggle_current_linewise()', opts) map('v', '/', 'lua require(\'Comment.api\').toggle_linewise_op(vim.fn.visualmode())', opts) +-- Telescope (See also configs/telescope.lua) +map("n", "fw", "Telescope live_grep", opts) +map("n", "gt", "Telescope git_status", opts) +map("n", "gc", "Telescope git_commits", opts) +map("n", "ff", "Telescope find_files", opts) +map("n", "fb", "Telescope buffers", opts) +map("n", "fh", "Telescope help_tags", opts) +map("n", "fo", "Telescope oldfiles", opts) -- This isn't working for some reason + diff --git a/lua/plugins.lua b/lua/plugins.lua index a4b81c7..7fe46bf 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -64,6 +64,8 @@ packer.startup { use { 'lukas-reineke/indent-blankline.nvim', config = function() require'configs.indent-blankline'.config() end } -- Telescope + use { 'nvim-telescope/telescope.nvim', config = function() require'configs.telescope'.config() end } + use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } -- -- Treesitter @@ -83,11 +85,7 @@ packer.startup { use { 'JoosepAlviste/nvim-ts-context-commentstring', after = 'nvim-treesitter' } -- - -- LSP - -- - - -- - -- Auto Complete + -- LSP / Auto Complete -- -- diff --git a/todo.txt b/todo.txt index bc3fe30..124b25c 100644 --- a/todo.txt +++ b/todo.txt @@ -18,19 +18,17 @@ [ ] Language Processing [x] Treesitter [x] nvim-ts-autotag - [ ] indent-blankline.nvim + [x] indent-blankline.nvim [x] comment [x] norcalli/nvim-colorizer.lua [x] nvim-ts-context-commentstring + [ ] Native LSP config [ ] nvim-autopairs [ ] nvim-lsp-installer - [ ] Native LSP [ ] lspsaga [ ] symbols-outline [ ] Null-LS [ ] SchemaStore - -[ ] Autocompletion [ ] LuaSnip [ ] nvim-cmp @@ -47,4 +45,6 @@ [ ] Bugs - [ ] Comment Colors don't show (but they show if you delete the compiled config and resync) + [ ] Web Devicons Colors don't show + - But they show if you delete the compiled config and resync) + - Also, changing the icon text works, it's just the color that is breaking