summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-08 15:51:28 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-11-08 15:51:28 +0100
commit160ce5e9595a18c1434562b42f2371be9c58f102 (patch)
tree942a3ad5de2f0ece44e4b3604dc71223be60c4ef
parent379cd763460659bfdbd49386108a9a5ab68663c2 (diff)
checkpoint
-rw-r--r--after/ftplugin/c.lua2
-rw-r--r--init.lua2
-rw-r--r--lua/config/lazy.lua53
-rw-r--r--lua/config/lsp.lua4
-rw-r--r--lua/config/map.lua1
5 files changed, 26 insertions, 36 deletions
diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua
index 0b5c163..d0d65be 100644
--- a/after/ftplugin/c.lua
+++ b/after/ftplugin/c.lua
@@ -10,7 +10,7 @@ map("n", ",i", function()
local word = vim.fn.expand("<cword>")
vim.cmd([[
normal m'
- 0/^#include/
+ 0
normal O
.!include.sh ]] .. word)
vim.cmd("normal ''")
diff --git a/init.lua b/init.lua
index fce222b..320638f 100644
--- a/init.lua
+++ b/init.lua
@@ -1,5 +1,5 @@
require("config.lazy")
require("config.set")
require("config.map")
--- require("config.lsp")
+require("config.lsp")
require("config.autocmds")
diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua
index a61e3b4..5aed367 100644
--- a/lua/config/lazy.lua
+++ b/lua/config/lazy.lua
@@ -23,41 +23,35 @@ require("lazy").setup({
"jghauser/follow-md-links.nvim",
"m4xshen/autoclose.nvim",
"stevearc/conform.nvim",
+ "norcalli/nvim-colorizer.lua",
+ "neovim/nvim-lspconfig",
+ {
+ "williamboman/mason.nvim",
+ dependencies = {
+ "williamboman/mason-lspconfig.nvim",
+ -- for formatters and linters
+ "WhoIsSethDaniel/mason-tool-installer.nvim",
+ },
+ config = function()
+ require("mason").setup({
+ ui = {
+ border = "rounded",
+ },
+ })
+ end,
+ },
+ {
+ --snippets
+ "L3MON4D3/LuaSnip",
+ version = "v2.*",
+ build = "make install_jsregexp",
+ },
-- "mfussenegger/nvim-lint",
- -- "neovim/nvim-lspconfig",
- -- {
- -- "norcalli/nvim-colorizer.lua",
- -- config = function()
- -- -- require("colorizer").setup()
- -- end,
- -- },
- --
- -- {
- -- "williamboman/mason.nvim",
- -- dependencies = {
- -- "williamboman/mason-lspconfig.nvim",
- -- -- for formatters and linters
- -- "WhoIsSethDaniel/mason-tool-installer.nvim",
- -- },
- -- config = function()
- -- require("mason").setup({
- -- ui = {
- -- border = "rounded",
- -- },
- -- })
- -- end,
- -- },
-- {
-- "ray-x/lsp_signature.nvim",
-- event = "LspAttach",
-- },
-- {
- -- --snippets
- -- "L3MON4D3/LuaSnip",
- -- version = "v2.*",
- -- build = "make install_jsregexp",
- -- },
- -- {
-- "hrsh7th/nvim-cmp",
-- dependencies = {
-- "hrsh7th/cmp-nvim-lsp",
@@ -68,7 +62,6 @@ require("lazy").setup({
-- },
-- event = { "InsertEnter", "CmdlineEnter" },
-- },
-
{
"folke/which-key.nvim",
event = "VeryLazy",
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua
index 977c629..8d03d84 100644
--- a/lua/config/lsp.lua
+++ b/lua/config/lsp.lua
@@ -1,12 +1,8 @@
-- [[ Keybinds ]]
-local capabilities = require("cmp_nvim_lsp").default_capabilities()
-local cmp = require("cmp")
-local context = require("cmp.config.context")
local diagnostic = vim.diagnostic
local lbuf = vim.lsp.buf
local map = vim.keymap.set
local lspconfig = require("lspconfig")
-local lspkind = require("lspkind")
local builtin = require("telescope.builtin")
map("n", " <cr>", lbuf.code_action, { desc = "Code actions" })
diff --git a/lua/config/map.lua b/lua/config/map.lua
index ace8134..7dcf82a 100644
--- a/lua/config/map.lua
+++ b/lua/config/map.lua
@@ -89,6 +89,7 @@ map("n", " ts", function()
vim.o.spell = verbose_toggle(vim.o.spell, "spelling")
end, { noremap = true, desc = "Toggle spelling" })
map("n", "<C-s>g", "z=1<cr><cr>", { noremap = true })
+vim.diagnostic.enable(false)
map("n", " td", function()
vim.diagnostic.enable(verbose_toggle(vim.diagnostic.is_enabled(), "diagnostics"))
end, { desc = "Toggle diagnostics" })