Skip to content

Commit

Permalink
enable treesitter and copilot
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi IIGUNI <[email protected]>
  • Loading branch information
guni1192 committed May 27, 2024
1 parent 03cf5b2 commit 0831efc
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 4 deletions.
1 change: 1 addition & 0 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-lspconfig": { "branch": "master", "commit": "b972e7154bc94ab4ecdbb38c8edbccac36f83996" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "78e11ab7cedabe5dfb3b600c6682712271c59acf" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"vim-kalisi": { "branch": "master", "commit": "8d076bd7989fcb14f995a0d4065a8f16cd00d4d6" },
"vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" }
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/color.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ vim.api.nvim_create_autocmd({'VimEnter', 'ColorScheme'}, {
})


vim.cmd("colorscheme kalisi")
vim.cmd("colorscheme default")
vim.opt.background = "dark"

require('lualine').setup {
Expand Down
2 changes: 1 addition & 1 deletion nvim/lua/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ vim.keymap.set('i', '<C-g>', 'copilot#Accept("<CR>")', {
expr = true,
replace_keycodes = false
})
vim.g.copilot_no_tab_map = true
-- vim.g.copilot_no_tab_map = true
53 changes: 51 additions & 2 deletions nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,59 @@ lazy.setup({
build = function() vim.fn["mkdp#util#install"]() end,
},
-- copilot
{ 'github/copilot.vim' }
{ 'github/copilot.vim' },
-- nvim-treeesitter
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
lazy = vim.fn.argc(-1) == 0,
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"go",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"rust",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
},
incremental_selection = {
enable = true,
},
textobjects = {
move = {
enable = true,
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
},
},
},
},
})


-- nvim-tree global keymap
local api = require "nvim-tree.api"
vim.keymap.set('n', '<C-e>', api.tree.toggle)
Expand Down

0 comments on commit 0831efc

Please sign in to comment.