diff --git a/modules/home-manager/cli/neovim/files/conform.lua b/modules/home-manager/cli/neovim/files/conform.lua index 54ec4f6..ff3d6d8 100644 --- a/modules/home-manager/cli/neovim/files/conform.lua +++ b/modules/home-manager/cli/neovim/files/conform.lua @@ -6,7 +6,6 @@ require("conform").setup({ }, formatters_by_ft = { yaml = {"yamlfmt"}, - sh = { "shfmt" }, ["_"] = { "trim_whitespace" }, } }) diff --git a/modules/home-manager/cli/neovim/files/lsp-line.lua b/modules/home-manager/cli/neovim/files/lsp-line.lua index 78aa9ad..d10b0bc 100644 --- a/modules/home-manager/cli/neovim/files/lsp-line.lua +++ b/modules/home-manager/cli/neovim/files/lsp-line.lua @@ -1,7 +1,2 @@ require('lsp_lines').setup() vim.diagnostic.config({ virtual_lines = true }) - --- Disable virtual_text since it's redundant due to lsp_lines. -vim.diagnostic.config({ - virtual_text = false, -}) diff --git a/modules/home-manager/cli/neovim/files/lspconfig.lua b/modules/home-manager/cli/neovim/files/lspconfig.lua index a672376..a7df681 100644 --- a/modules/home-manager/cli/neovim/files/lspconfig.lua +++ b/modules/home-manager/cli/neovim/files/lspconfig.lua @@ -77,21 +77,6 @@ vim.api.nvim_create_autocmd("FileType", { lspconfig.lua_ls.setup { capabilities = capabilities, single_file_support = true, - settings = { - Lua = { - diagnostics = { - globals = {'vim'} -- Add any globals you want to ignore as undefined - }, - workspace = { - library = { - [vim.fn.expand('$VIMRUNTIME/lua')] = true - } - }, - telemetry = { - enable = false -- Disable telemetry - } - } - }, flags = { debounce_text_changes = 150, } @@ -207,7 +192,7 @@ vim.api.nvim_create_autocmd('LspAttach', { -- Jumps to the definition of the type symbol bufmap('n', 'go', 'lua vim.lsp.buf.type_definition()') - -- Lists all the references + -- Lists all the references bufmap('n', 'gr', 'lua vim.lsp.buf.references()') -- Displays a function's signature information diff --git a/modules/home-manager/cli/neovim/files/options.lua b/modules/home-manager/cli/neovim/files/options.lua index 2dd3332..755cd91 100644 --- a/modules/home-manager/cli/neovim/files/options.lua +++ b/modules/home-manager/cli/neovim/files/options.lua @@ -30,24 +30,17 @@ vim.opt.signcolumn = "yes" -- alway show sign column vim.opt.number = true vim.opt.relativenumber = true vim.opt.cursorline = true -- highlight current line +vim.opt.shiftwidth = 4 vim.opt.showmatch = true vim.opt.smartcase = true -- search: try :to be smart about cases vim.opt.smartindent = true -vim.opt.tabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.softtabstop = 2 +vim.opt.tabstop = 4 vim.opt.wildmenu = true -- activate enhanced user menu vim.opt.wildmode = 'lastused:full,list' -- enhance menu vim.opt.pumheight = 10 vim.opt.pumwidth = 50 vim.opt.pumblend = 10 --- manage line break smartly -vim.opt.wrap = true -vim.opt.breakindent = true -vim.opt.linebreak = true -vim.opt.showbreak = string.rep(" ", 3) -- Make it so that long lines wrap smartly - -- need to activate this for cmp vim.opt.completeopt = {'menu', 'menuone', 'noselect'} -- -- Code Fold @@ -55,6 +48,16 @@ vim.opt.completeopt = {'menu', 'menuone', 'noselect'} vim.cmd('au BufWinLeave *.* mkview') vim.cmd('au BufWinEnter *.* silent! loadview') + +-- Diagnostic settings +-- +-- diagnostic windows must be float +vim.diagnostic.config { + virtual_text = false, + signs = true, + underline = true, +} + local signs = { Error = "", Warn = "", Hint = "󰌶", Info = "" } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type @@ -67,6 +70,8 @@ vim.o.updatetime = 250 vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', header = "", prefix = "", focus=false})]] -- Autotype +vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80') +vim.cmd('au BufRead,BufNewFile *.tex setlocal textwidth=80') vim.cmd('au BufRead,BufNewFile *.nix setlocal tabstop=2 shiftwidth=2 ') vim.cmd('au BufNewFile,BufRead /tmp/neomutt* set tw=72 fo=awq comments+=nb:> noautoindent filetype=mail') diff --git a/nixos/includes/system/overlay.nix b/nixos/includes/system/overlay.nix index d4c3daa..24dae79 100644 --- a/nixos/includes/system/overlay.nix +++ b/nixos/includes/system/overlay.nix @@ -6,6 +6,6 @@ enableWideVine = if pkgs.system == "x86_64-linux" then true else false; }; }) - inputs.nur.overlays.default + inputs.nur.overlay ]; }