Skip to content

Commit

Permalink
adds treesitter, telescope, and git
Browse files Browse the repository at this point in the history
  • Loading branch information
carywreams committed Apr 29, 2022
1 parent 9eea66f commit c08b3a7
Show file tree
Hide file tree
Showing 8 changed files with 465 additions and 134 deletions.
100 changes: 99 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,102 @@
## TODO

+ integrating PHAN with LSP will require installing PHAN in a project directory


## Plugins


+ [David-Kunz/cmp-npm](https://github.com/David-Kunz/cmp-npm) -- Suggested
+ [JoosepAlviste/nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) -- Suggested
+ [L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip) -- ACTIVE
+ [MattesGroeger/vim-bookmarks](https://github.com/MattesGroeger/vim-bookmarks) -- Suggested
+ [Mephistophiles/surround.nvim](https://github.com/Mephistophiles/surround.nvim) -- Suggested
+ [Pocco81/DAPInstall.nvim](https://github.com/Pocco81/DAPInstall.nvim) -- Suggested
+ [RRethy/vim-illuminate](https://github.com/RRethy/vim-illuminate) -- Suggested
+ [Shatur/neovim-session-manager](https://github.com/Shatur/neovim-session-manager) -- Suggested
+ [SmiteshP/nvim-gps](https://github.com/SmiteshP/nvim-gps) -- Suggested
+ [ThePrimeagen/harpoon](https://github.com/ThePrimeagen/harpoon) -- Suggested
+ [ahmedkhalf/project.nvim](https://github.com/ahmedkhalf/project.nvim) -- Suggested
+ [akinsho/bufferline.nvim](https://github.com/akinsho/bufferline.nvim) -- Suggested
+ [akinsho/toggleterm.nvim](https://github.com/akinsho/toggleterm.nvim) -- Suggested
+ [andymass/vim-matchup](https://github.com/andymass/vim-matchup) -- Suggested
+ [antoinemadec/FixCursorHold.nvim](https://github.com/antoinemadec/FixCursorHold.nvim) -- ACTIVE
+ [b0o/SchemaStore.nvim](https://github.com/b0o/SchemaStore.nvim) -- Suggested
+ [christianchiarulli/nvim-ts-rainbow](https://github.com/christianchiarulli/nvim-ts-rainbow) -- Suggested
+ [f-person/git-blame.nvim](https://github.com/f-person/git-blame.nvim) -- ACTIVE
+ [filipdutescu/renamer.nvim](https://github.com/filipdutescu/renamer.nvim) -- ACTIVE
+ [folke/todo-comments.nvim](https://github.com/folke/todo-comments.nvim) -- Suggested
+ [folke/tokyonight.nvim](https://github.com/folke/tokyonight.nvim) -- Suggested
+ [folke/trouble.nvim](https://github.com/folke/trouble.nvim) -- Suggested
+ [folke/which-key.nvim](https://github.com/folke/which-key.nvim) -- Suggested
+ [folke/zen-mode.nvim](https://github.com/folke/zen-mode.nvim) -- Suggested
+ [github/copilot.vim](https://github.com/github/copilot.vim) -- Suggested
+ [goolord/alpha-nvim](https://github.com/goolord/alpha-nvim) -- Suggested
+ [hrsh7th/cmp-buffer](https://github.com/hrsh7th/cmp-buffer) -- ACTIVE
+ [hrsh7th/cmp-cmdline](https://github.com/hrsh7th/cmp-cmdline) -- ACTIVE
+ [hrsh7th/cmp-emoji](https://github.com/hrsh7th/cmp-emoji) -- ACTIVE
+ [hrsh7th/cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) -- ACTIVE
+ [hrsh7th/cmp-nvim-lua](https://github.com/hrsh7th/cmp-nvim-lua) -- ACTIVE
+ [hrsh7th/cmp-path](https://github.com/hrsh7th/cmp-path) -- ACTIVE
+ [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp) -- ACTIVE
+ [https://github.com/rhysd/conflict-marker.vim](https://github.com/https://github.com/rhysd/conflict-marker.vim) -- Suggested
+ [iamcco/markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim) -- Suggested
+ [jose-elias-alvarez/null-ls.nvim](https://github.com/jose-elias-alvarez/null-ls.nvim) -- ACTIVE
+ [karb94/neoscroll.nvim](https://github.com/karb94/neoscroll.nvim) -- Suggested
+ [kevinhwang91/nvim-bqf](https://github.com/kevinhwang91/nvim-bqf) -- Suggested
+ [kyazdani42/nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) -- Suggested
+ [kyazdani42/nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) -- Suggested
+ [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- ACTIVE
+ [lewis6991/impatient.nvim](https://github.com/lewis6991/impatient.nvim) -- Suggested
+ [lukas-reineke/indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) -- Suggested
+ [lunarvim/colorschemes](https://github.com/lunarvim/colorschemes) -- ACTIVE
+ [lunarvim/darkplus.nvim](https://github.com/lunarvim/darkplus.nvim) -- ACTIVE
+ [lunarvim/vim-solidity](https://github.com/lunarvim/vim-solidity) -- Suggested
+ [matbme/JABS.nvim](https://github.com/matbme/JABS.nvim) -- Suggested
+ [mattn/vim-gist](https://github.com/mattn/vim-gist) -- Suggested
+ [mattn/webapi-vim](https://github.com/mattn/webapi-vim) -- Suggested
+ [metakirby5/codi.vim](https://github.com/metakirby5/codi.vim) -- Suggested
+ [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) -- Suggested
+ [mfussenegger/nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) -- Suggested
+ [michaelb/sniprun](https://github.com/michaelb/sniprun) -- Suggested
+ [mizlan/iswap.nvim](https://github.com/mizlan/iswap.nvim) -- Suggested
+ [moll/vim-bbye](https://github.com/moll/vim-bbye) -- Suggested
+ [monaqa/dial.nvim](https://github.com/monaqa/dial.nvim) -- Suggested
+ [nacro90/numb.nvim](https://github.com/nacro90/numb.nvim) -- Suggested
+ [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) -- ACTIVE
+ [norcalli/nvim-colorizer.lua](https://github.com/norcalli/nvim-colorizer.lua) -- Suggested
+ [numToStr/Comment.nvim](https://github.com/numToStr/Comment.nvim) -- Suggested
+ [nvim-lua/plenary.nvim](https://github.com/nvim-lua/plenary.nvim) -- ACTIVE
+ [nvim-lua/popup.nvim](https://github.com/nvim-lua/popup.nvim) -- ACTIVE
+ [nvim-lualine/lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) -- Suggested
+ [nvim-telescope/telescope-file-browser.nvim](https://github.com/nvim-telescope/telescope-file-browser.nvim) -- ACTIVE
+ [nvim-telescope/telescope-media-files.nvim](https://github.com/nvim-telescope/telescope-media-files.nvim) -- ACTIVE
+ [nvim-telescope/telescope-ui-select.nvim](https://github.com/nvim-telescope/telescope-ui-select.nvim) -- ACTIVE
+ [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) -- ACTIVE
+ [nvim-treesitter/nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) -- ACTIVE
+ [nvim-treesitter/playground](https://github.com/nvim-treesitter/playground) -- ACTIVE
+ [nyngwang/NeoZoom.lua](https://github.com/nyngwang/NeoZoom.lua) -- Suggested
+ [p00f/nvim-ts-rainbow](https://github.com/p00f/nvim-ts-rainbow) -- Suggested
+ [phaazon/hop.nvim](https://github.com/phaazon/hop.nvim) -- Suggested
+ [rafamadriz/friendly-snippets](https://github.com/rafamadriz/friendly-snippets) -- ACTIVE
+ [ray-x/lsp_signature.nvim](https://github.com/ray-x/lsp_signature.nvim) -- ACTIVE
+ [rcarriga/nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) -- Suggested
+ [rcarriga/nvim-notify](https://github.com/rcarriga/nvim-notify) -- Suggested
+ [rebelot/kanagawa.nvim](https://github.com/rebelot/kanagawa.nvim) -- Suggested
+ [romgrk/nvim-treesitter-context](https://github.com/romgrk/nvim-treesitter-context) -- ACTIVE
+ [rose-pine/neovim](https://github.com/rose-pine/neovim) -- Suggested
+ [ruifm/gitlinker.nvim](https://github.com/ruifm/gitlinker.nvim) -- Suggested
+ [saadparwaiz1/cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) -- ACTIVE
+ [simrat39/symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) -- ACTIVE
+ [tamago324/lir.nvim](https://github.com/tamago324/lir.nvim) -- Suggested
+ [tamago324/nlsp-settings.nvim](https://github.com/tamago324/nlsp-settings.nvim) -- ACTIVE
+ [theHamsta/nvim-dap-virtual-text](https://github.com/theHamsta/nvim-dap-virtual-text) -- Suggested
+ [tom-anders/telescope-vim-bookmarks.nvim](https://github.com/tom-anders/telescope-vim-bookmarks.nvim) -- ACTIVE
+ [tpope/vim-repeat](https://github.com/tpope/vim-repeat) -- Suggested
+ [tversteeg/registers.nvim](https://github.com/tversteeg/registers.nvim) -- Suggested
+ [tzachar/cmp-tabnine](https://github.com/tzachar/cmp-tabnine) -- Suggested
+ [unblevable/quick-scope](https://github.com/unblevable/quick-scope) -- Suggested
+ [wbthomason/packer.nvim](https://github.com/wbthomason/packer.nvim) -- ACTIVE
+ [williamboman/nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer) -- ACTIVE
+ [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs) -- ACTIVE
+ [windwp/nvim-spectre](https://github.com/windwp/nvim-spectre) -- Suggested
+ [windwp/nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag) -- Suggested
70 changes: 68 additions & 2 deletions checkhealth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,44 @@ nvim-lsp-installer: require("nvim-lsp-installer.health").check()
- OK: **wget**: `GNU Wget 1.21.2 built on linux-gnu.`
- OK: **python3**: `Python 3.10.4`
- OK: **node**: `v16.15.0`
- OK: **curl**: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.11`
- OK: **PHP**: `PHP 8.1.2 (cli) (built: Apr 7 2022 17:46:26) (NTS)`
- OK: **curl**: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.11`
- OK: **java**: `Ok`
- OK: **npm**: `8.5.5`
- OK: **pip3**: `pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)`

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
- WARNING: `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK: `node` found v16.15.0 (only needed for :TSInstallFromGrammar)
- OK: `git` executable found.
- OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
- OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
- make ✓ . . . ✓
- json ✓ ✓ ✓ ✓ .
- javascript ✓ ✓ ✓ ✓ ✓
- php ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- scss ✓ . . ✓ .
- bash ✓ ✓ ✓ . ✓
- latex ✓ . ✓ . ✓
- http ✓ . . . ✓
- c ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ . . ✓
- r ✓ ✓ . ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ . ✓
- yaml ✓ ✓ ✓ ✓ ✓

Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}

provider: health#provider#check
========================================================================
## Clipboard (optional)
Expand Down Expand Up @@ -82,14 +114,48 @@ renamer: require("renamer.health").check()

## Chechking whether setup was made...

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
- OK: plenary installed.
- OK: nvim-treesitter installed.

## Checking external dependencies
- OK: rg: found ripgrep 13.0.0
- OK: fd: found fd 8.3.1

## ===== Installed extensions =====

## Telescope Extension: `file_browser`
- INFO: No healthcheck provided

## Telescope Extension: `media_files`
- INFO: No healthcheck provided

vim.lsp: require("vim.lsp.health").check()
========================================================================
- INFO: LSP log level : WARN
- INFO: Log path: /home/creams/.cache/nvim/lsp.log
- INFO: Log size: 1 KB
- INFO: Log size: 2 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
- INFO: Runtime ABI version : 14
- OK: Loaded parser for bash: ABI version 13
- OK: Loaded parser for c: ABI version 13
- OK: Loaded parser for css: ABI version 13
- OK: Loaded parser for html: ABI version 13
- OK: Loaded parser for http: ABI version 13
- OK: Loaded parser for javascript: ABI version 13
- OK: Loaded parser for json: ABI version 13
- OK: Loaded parser for latex: ABI version 13
- OK: Loaded parser for make: ABI version 13
- OK: Loaded parser for markdown: ABI version 13
- OK: Loaded parser for php: ABI version 13
- OK: Loaded parser for query: ABI version 13
- OK: Loaded parser for r: ABI version 13
- OK: Loaded parser for scss: ABI version 13
- OK: Loaded parser for vim: ABI version 13
- OK: Loaded parser for yaml: ABI version 13
- OK: Loaded parser for c: ABI version 13

10 changes: 10 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ require "user.lunarvim_colorschemes_config"
require "user.hrsh7th_nvim_cmp_config"
require "user.filipdutescu_renamer_config"
require "user.lsp"


-- tag: generation_03
require "user.nvim_telescope_config"
require "user.nvim_treesitter_config"
-- git support start
require "user.f_person_git_blame_config"
require "user.lewis6991_gitsigns_config"
-- git support stop

3 changes: 3 additions & 0 deletions lua/user/f_person_git_blame_config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vim.g.gitblame_enabled = 0
vim.g.gitblame_message_template = "<summary> • <date> • <author>"
vim.g.gitblame_highlight_group = "LineNr"
48 changes: 48 additions & 0 deletions lua/user/lewis6991_gitsigns_config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
return
end

gitsigns.setup {
signs = {
add = { hl = "GitSignsAdd", text = "", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
change = { hl = "GitSignsChange", text = "", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
delete = { hl = "GitSignsDelete", text = "", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
topdelete = { hl = "GitSignsDelete", text = "", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
changedelete = { hl = "GitSignsChange", text = "", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
interval = 1000,
follow_files = true,
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter_opts = {
relative_time = false,
},
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
col = 1,
},
yadm = {
enable = false,
},
}
125 changes: 125 additions & 0 deletions lua/user/nvim_telescope_config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end

local actions = require "telescope.actions"
telescope.load_extension "media_files"
local icons = require("user.icons")

telescope.setup {
defaults = {

prompt_prefix = icons.ui.Telescope .. " ",
selection_caret = "",
path_display = { "smart" },

mappings = {
i = {
["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev,

["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,

["<C-c>"] = actions.close,

["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,

["<CR>"] = actions.select_default,
["<C-s>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,

['<c-d>'] = require('telescope.actions').delete_buffer,

-- ["<C-u>"] = actions.preview_scrolling_up,
-- ["<C-d>"] = actions.preview_scrolling_down,

["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,

["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
},

n = {
["<esc>"] = actions.close,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,

["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = 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,

["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,

["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,

["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,

["?"] = actions.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
},
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = { "png", "webp", "jpg", "jpeg" },
find_cmd = "rg", -- find command (defaults to `fd`)
},
file_browser = {
-- theme = "ivy",
-- require("telescope.themes").get_dropdown {
-- previewer = false,
-- -- even more opts
-- },
mappings = {
["i"] = {
-- your custom insert mode mappings
},
["n"] = {
-- your custom normal mode mappings
},
},
},
-- ["ui-select"] = {
-- require("telescope.themes").get_dropdown {
-- previewer = false,
-- -- even more opts
-- },
-- },
},
}

-- telescope.load_extension "ui-select"
telescope.load_extension "file_browser"
Loading

0 comments on commit c08b3a7

Please sign in to comment.