diff --git a/init.lua b/init.lua index 070162a4..3cabc6fd 100644 --- a/init.lua +++ b/init.lua @@ -69,8 +69,6 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 -vim.g.copilot_suggestions = 5 - -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -123,6 +121,13 @@ if not vim.loop.fs_stat(lazypath) then end ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) +-- !!!!!!!!!!!!!!!!!!!!! -- +vim.filetype.add { + pattern = { + ['.*idcl'] = 'idcl', + }, +} + -- [[ Configure and install plugins ]] -- To check the current status of your plugins, run -- :Lazy @@ -154,11 +159,11 @@ require('lazy').setup({ }, }) -local lspconfig = require 'lspconfig' - --- Disable diagnostics and warnings for clangd -lspconfig.clangd.setup { - handlers = { - ['textDocument/publishDiagnostics'] = function() end, - }, -} +-- local lspconfig = require 'lspconfig' +-- +-- -- Disable diagnostics and warnings for clangd +-- lspconfig.clangd.setup { +-- handlers = { +-- ['textDocument/publishDiagnostics'] = function() end, +-- }, +-- } diff --git a/lua/plugins/nvim_lspconfig.lua b/lua/plugins/nvim_lspconfig.lua index 0c680331..67f46c85 100644 --- a/lua/plugins/nvim_lspconfig.lua +++ b/lua/plugins/nvim_lspconfig.lua @@ -155,11 +155,7 @@ return { -- LSP Configuration & Plugins -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - clangd = { - diagnostics = { - enable = false, - }, - }, + clangd = {}, -- gopls = {}, pyright = {}, -- rust_analyzer = {}, @@ -216,5 +212,14 @@ return { -- LSP Configuration & Plugins end, }, } + + local lspconfig = require 'lspconfig' + + -- Disable diagnostics and warnings for clangd + lspconfig.clangd.setup { + handlers = { + ['textDocument/publishDiagnostics'] = function() end, + }, + } end, } diff --git a/lua/plugins/nvim_treesitter.lua b/lua/plugins/nvim_treesitter.lua index 83809c10..039ec24c 100644 --- a/lua/plugins/nvim_treesitter.lua +++ b/lua/plugins/nvim_treesitter.lua @@ -28,5 +28,18 @@ return { -- Highlight, edit, and navigate code -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + -- + + local parser_config = require('nvim-treesitter.parsers').get_parser_configs() + parser_config.idcl = { + install_info = { + url = '/home/jhe/src/tree-sitter-idcl', -- Path to the tree-sitter-idcl repo + files = { 'src/parser.c' }, + -- optional entries: + branch = 'master', -- default branch in case of git repo if different from master + generate_requires_npm = false, -- if stand-alone parser without npm dependencies + requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c + }, + } end, }