Compare commits

...

5 commits

Author SHA1 Message Date
Paul Stemmet e0e3d72e8e
nvim: fix lsp.preset.Rust opts handling
Passed structure was incorrect
2024-09-08 19:26:10 +00:00
Paul Stemmet ac705ce937
merge: develop <--- feat/nvim-minor-improvements
* HEAD
| \
| * 38568df <github@luxolus.com> nvim: improve cspell.json file handling
| * afaf382 <github@luxolus.com> nvim: improve ToggleGutter to remove indent trace, diagnostics
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2024-09-07 16:09:00 +00:00
Paul Stemmet 38568df712
nvim: improve cspell.json file handling
This doesn't handle looking for workspace level files, but will stop
the "Add word to dictionary" code action from creating random
cspell.json files in whatever vim considers to be the current working
directory.

Eventually, I'd like to move this all into neoconf.json, but this is
better than the current, non functional state
2024-09-07 16:05:42 +00:00
Paul Stemmet afaf382e25
nvim: improve ToggleGutter to remove indent trace, diagnostics
So that it fulfills its intended purpose: making vim ready for terminal
level copying.

This removes the extra overlay'd text segments from the window
2024-09-07 16:05:15 +00:00
Paul Stemmet 7724f3d086
merge: develop <--- feature/LazyVim
* HEAD
| \
| * fbc0ca3 <github@luxolus.com> docs: update README for nvim changes
| * 80ed55f <github@luxolus.com> zshrc: add podman,bazel opt plugs
| * ad874d1 <github@luxolus.com> zshrc: rm PSOXIZSH_EXPERIMENTAL_NEOVIM_LUA flag
| * 269c980 <github@luxolus.com> nvim: add psoxizsh.function key binds
| * 055ce78 <github@luxolus.com> nvim: use Global.* key binds in psoxizsh.plugins
| * 69a424a <github@luxolus.com> nvim: use Buffer.Lsp key binds in psoxizsh.lsp.key
| * f22a04f <github@luxolus.com> nvim: add psoxizsh.functions
| * aa49be0 <github@luxolus.com> nvim: refactor psoxizsh.key
| * 478c623 <github@luxolus.com> init.lua: rewrite nvim entrypoint to use psoxizsh.entrypoint
| * f4cf1b7 <github@luxolus.com> nvim: add psoxizsh.entrypoint
| * b17c563 <github@luxolus.com> nvim: add psoxizsh.entrypoint.profile
| * 585e13d <github@luxolus.com> nvim: add psoxizsh.startup.keybinds
| * 1637296 <github@luxolus.com> nvim: add psoxizsh.startup
| * bf29a51 <github@luxolus.com> nvim: add psoxizsh.plugins.ide
| * 9add4b0 <github@luxolus.com> nvim: add psoxizsh.lsp.keys
| * 0a15980 <github@luxolus.com> nvim: add psoxizsh.plugins.editor
| * 388b6da <github@luxolus.com> nvim: add psoxizsh.plugins.treesitter
| * ecb1bc2 <github@luxolus.com> nvim: add psoxizsh.plugins.ui
| * 1613c7b <github@luxolus.com> nvim: add psoxizsh.plugins.colorscheme
| * 3a56818 <github@luxolus.com> nvim: add psoxizsh.plugins.core
| * cf879d6 <github@luxolus.com> nvim: add psoxizsh.lsp.preset servers
| * b22285e <github@luxolus.com> nvim: add psoxizsh.lsp.core
| * f4a32dc <github@luxolus.com> nvim: add submodule lazy.nvim
| * fff545c <github@luxolus.com> nvim: rm psoxizsh.plugins.plug
| * 85081d7 <github@luxolus.com> nvim: rm old psoxizsh.lsp.{preset,servers,util} modules
| * ad7f34b <github@luxolus.com> nvim: rm orphaned modules psoxizsh.{plugins.bootstrap,diagnostic}
| * 5e80c28 <github@luxolus.com> repo: rm examples/ nvim/spellfile
| * 53ade04 <github@luxolus.com> repo: update submodules
| /
| develop

Signed-off-by: Bazaah <github@luxolus.com>
2024-08-31 19:02:05 +00:00
3 changed files with 18 additions and 2 deletions

View file

@ -4,18 +4,22 @@ local M, S = {}, {}
---Toggle the line numbers and diagnostic gutter ---Toggle the line numbers and diagnostic gutter
function M.ToggleGutter() function M.ToggleGutter()
local o = vim.opt local o, diagnostic = vim.opt, vim.diagnostic
if o.number:get() then if o.number:get() then
S.signcolumn = o.signcolumn:get() S.signcolumn = o.signcolumn:get()
o.number = false o.number = false
o.relativenumber = false o.relativenumber = false
o.signcolumn = 'no' o.signcolumn = 'no'
diagnostic.enable(false)
else else
o.number = true o.number = true
o.relativenumber = true o.relativenumber = true
o.signcolumn = S.signcolumn or 'yes:1' o.signcolumn = S.signcolumn or 'yes:1'
diagnostic.enable(true)
end end
vim.cmd 'IBLToggle'
end end
---Open a float with your local config files ---Open a float with your local config files

View file

@ -48,7 +48,9 @@ M.Python = core.preset('pyright', 'lazyvim.plugins.extras.lang.python', core.lsp
M.Rust = core.preset('rust-analyzer', 'lazyvim.plugins.extras.lang.rust', function(server, opts) M.Rust = core.preset('rust-analyzer', 'lazyvim.plugins.extras.lang.rust', function(server, opts)
return { return {
'mrcjkb/rustaceanvim', 'mrcjkb/rustaceanvim',
opts = { default_settings = core.make_server(server, opts.settings) } opts = {
server = { default_settings = { [server] = opts.settings } }
}
} }
end) end)

View file

@ -144,8 +144,12 @@ return {
-- CSpell setup -- CSpell setup
local cspell = require 'cspell' local cspell = require 'cspell'
local cspell_config_json = function(_)
return vim.fn.stdpath('config') .. '/cspell.json'
end
local cspell_opts = { local cspell_opts = {
config = { config = {
find_json = cspell_config_json,
on_add_to_json = function(payload) on_add_to_json = function(payload)
if vim.fn.executable('jq') == 0 then return end if vim.fn.executable('jq') == 0 then return end
@ -172,6 +176,12 @@ return {
end, end,
} }
-- Ensure our config file exists, otherwise cspell complains
local uv = (vim.uv or vim.loop);
if not uv.fs_stat(cspell_config_json()) then
vim.fn.writefile({'{}'}, cspell_config_json())
end
opts.sources = vim.tbl_extend('force', opts.sources or {}, { opts.sources = vim.tbl_extend('force', opts.sources or {}, {
cspell.diagnostics.with(cspell_opts), cspell.diagnostics.with(cspell_opts),
cspell.code_actions.with(cspell_opts), cspell.code_actions.with(cspell_opts),