diff options
| author | Kj Tsanaktsidis <kjtsanaktsidis@groq.com> | 2025-09-12 20:34:02 +1000 |
|---|---|---|
| committer | Kj Tsanaktsidis <kjtsanaktsidis@groq.com> | 2025-09-12 20:34:02 +1000 |
| commit | cb35955d16f7c39ea1ccc9258ffdffa94e56a9c7 (patch) | |
| tree | 8eac83fadfd171bef4275f8ef6041685c4f25fbf /kj-laptop01/lazyvim-config.lua | |
| parent | 33c4e049872675e4f388c2a479982d6e6d47b35d (diff) | |
lazyvim
Diffstat (limited to 'kj-laptop01/lazyvim-config.lua')
| -rw-r--r-- | kj-laptop01/lazyvim-config.lua | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/kj-laptop01/lazyvim-config.lua b/kj-laptop01/lazyvim-config.lua new file mode 100644 index 0000000..038ed1b --- /dev/null +++ b/kj-laptop01/lazyvim-config.lua @@ -0,0 +1,49 @@ +-- Store a lot of history +vim.opt.history = 10000 +-- Enable mouse support +vim.opt.mouse = "a" +-- Line numbers +vim.opt.number = true +-- Vim janks about a lot as the LSP floats in or out if the sign column width +-- is not fixed ahead of time. +vim.opt.signcolumn = "yes:1" +-- don't take up the whole screen with popups +vim.opt.pumheight = 15 +-- lazy.nvim does relative line numbers +vim.wo.relativenumber = false +-- .nvimrc files +vim.opt.exrc = true +-- disable autoformat by default +vim.g.autoformat = false +vim.g.root_spec = { "cwd" } + +--[[ +local cmp = require("cmp") +local enabled_except_in_comments = function() + if vim.api.nvim_get_mode().mode == "c" then + return true + else + local context = require("cmp.config.context") + return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment") + end +end +cmp.setup.filetype("markdown", { + enabled = false, +}) + +for _, ft in ipairs({ "c", "cpp", "ruby" }) do + cmp.setup.filetype(ft, { + enabled = enabled_except_in_comments, + }) +end +]]-- + +vim.api.nvim_create_user_command("DiagHide", function(args) + vim.diagnostic.enable(false) +end, {}) +vim.api.nvim_create_user_command("DiagShow", function(args) + vim.diagnostic.enable(true) +end, {}) +vim.api.nvim_create_user_command("FindRefs", function(args) + require("telescope.builtin").lsp_references() +end, {}) |
