Skip to content

Commit 80452b8

Browse files
committed
[nvim] Update treesitter config
1 parent 5c87b9d commit 80452b8

4 files changed

Lines changed: 50 additions & 56 deletions

File tree

nvim/lazy-lock.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
<<<<<<< Updated upstream
23
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
34
"catppuccin": { "branch": "main", "commit": "4965db2d6155c25db4e8417465fc2703fdf4c2b7" },
45
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
@@ -27,4 +28,34 @@
2728
"vim-wakatime": { "branch": "master", "commit": "e46d7c4f98ee0f40782008dd60cb2a79c377fb1d" },
2829
"which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" },
2930
"yazi.nvim": { "branch": "main", "commit": "8418e7028f91feacffcf75236fd4e93a5a3fe911" }
31+
=======
32+
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
33+
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
34+
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
35+
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
36+
"fzf-lua": { "branch": "main", "commit": "4be0a6923a64dc411489b57b77a6bf6f30404e66" },
37+
"gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" },
38+
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
39+
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
40+
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
41+
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
42+
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
43+
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
44+
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
45+
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
46+
"nvim-lspconfig": { "branch": "master", "commit": "8a9378a822719346a0288fa004dab302ca3c0a8f" },
47+
"nvim-tree.lua": { "branch": "master", "commit": "85d1145ac71c1b8e1423862c78165a1f609faf60" },
48+
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
49+
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
50+
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
51+
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
52+
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
53+
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
54+
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
55+
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
56+
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
57+
"vim-wakatime": { "branch": "master", "commit": "cb7ba055330245b3a9d29f8bb4b82aeb2d52e580" },
58+
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
59+
"yazi.nvim": { "branch": "main", "commit": "a4c292e0cb2647773e91ae29eeb87dd26f33c6b9" }
60+
>>>>>>> Stashed changes
3061
}

nvim/lua/elmon/plugins/colors.lua

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
return {
2-
-- {
3-
-- "EdenEast/nightfox.nvim",
4-
-- name = "nightfox",
5-
-- config = function()
6-
-- require("nightfox").setup({transparent = true})
7-
-- vim.cmd.colorscheme "carbonfox"
8-
-- end
9-
-- }
102
{
113
"catppuccin/nvim",
124
name = "catppuccin",
13-
priority = 1000,
145

156
config = function()
167
require("catppuccin").setup({transparent_background = true})

nvim/lua/elmon/plugins/lsp-config.lua

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,22 @@ return {
99
"williamboman/mason-lspconfig.nvim",
1010
config = function()
1111
require("mason-lspconfig").setup({
12-
ensure_installed = { 'lua_ls', 'ts_ls', 'clangd', 'gopls', 'markdown_oxide', 'pylsp', 'jdtls'}
12+
ensure_installed = { 'lua_ls', 'ts_ls', 'clangd', 'gopls', 'markdown_oxide', 'pylsp', 'jdtls' }
1313
})
1414
end
1515
},
1616
{
1717
"neovim/nvim-lspconfig",
1818
config = function()
19-
local lspconfig = require("lspconfig")
20-
-- Setup language servers here
21-
--
2219
local capabilities = require('cmp_nvim_lsp').default_capabilities()
23-
lspconfig.lua_ls.setup({
24-
capabilities = capabilities
25-
})
26-
lspconfig.ts_ls.setup({
27-
capabilities = capabilities
28-
})
29-
lspconfig.clangd.setup({
30-
capabilities = capabilities
31-
})
32-
lspconfig.gopls.setup({
33-
capabilities = capabilities
34-
})
35-
lspconfig.pylsp.setup({
36-
capabilities = capabilities
37-
})
38-
lspconfig.jdtls.setup({
39-
capabilities = capabilities
40-
})
20+
21+
local servers = { 'lua_ls', 'ts_ls', 'clangd', 'gopls', 'pylsp', 'jdtls' }
22+
for _, server in ipairs(servers) do
23+
vim.lsp.config(server, {
24+
capabilities = capabilities
25+
})
26+
vim.lsp.enable(server)
27+
end
4128

4229
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
4330
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
1-
-- treesitter-config.lua
21
return {
32
{
43
"nvim-treesitter/nvim-treesitter",
5-
event = { "BufReadPre", "BufNewFile" },
6-
dependencies = {
7-
"nvim-treesitter/nvim-treesitter-textobjects",
8-
"windwp/nvim-ts-autotag",
9-
},
4+
build = ":TSUpdate",
5+
lazy = false,
106
config = function()
11-
local configs = require("nvim-treesitter.configs")
12-
configs.setup({
13-
-- Add a language of your choice
14-
ensure_installed = {"cpp", "python", "lua", "java", "javascript", "vim", "vimdoc"},
15-
sync_install = false,
16-
ignore_install = { "" }, -- List of parsers to ignore installing
17-
highlight = {
18-
enable = true, -- false will disable the whole extension
19-
disable = { "" }, -- list of language that will be disabled
20-
additional_vim_regex_highlighting = true,
21-
},
22-
indent = { enable = true, disable = { "yaml" } },
23-
rainbow = {
24-
enable = true,
25-
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
26-
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
27-
max_file_lines = nil, -- Do not enable for files with more than n lines, int
28-
-- colors = {}, -- table of hex strings
29-
-- termcolors = {} -- table of colour name strings
7+
-- New 0.12 API — no more configs.setup()
8+
require("nvim-treesitter").setup({
9+
ensure_installed = {
10+
"luadoc", "markdown", "cpp", "python",
11+
"lua", "java", "javascript", "vim", "vimdoc"
3012
},
3113
})
3214
end,
3315
},
16+
-- textobjects is also archived, drop it or find a replacement
17+
-- nvim-ts-autotag may still work standalone:
18+
{ "windwp/nvim-ts-autotag", opts = {} },
3419
}

0 commit comments

Comments
 (0)