refactor: notebook configration
This commit is contained in:
34
hosts/nb/modules/development/nvim/config/utils.lua
Normal file
34
hosts/nb/modules/development/nvim/config/utils.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- none-ls
|
||||
local status_ok_nls, none_ls_module = pcall(require, "none-ls")
|
||||
if not status_ok_nls then
|
||||
vim.notify("none-ls plugin not found or failed to load. Check Nix config and plugin paths.", vim.log.levels.WARN)
|
||||
else
|
||||
local nb = none_ls_module.builtins
|
||||
none_ls_module.setup({
|
||||
sources = {
|
||||
nb.formatting.alejandra,
|
||||
nb.code_actions.statix,
|
||||
nb.diagnostics.cppcheck,
|
||||
nb.diagnostics.deadnix,
|
||||
nb.diagnostics.statix,
|
||||
nb.diagnostics.eslint,
|
||||
nb.completion.spell,
|
||||
},
|
||||
debug = false, -- You can set this to true for more verbose output from none-ls
|
||||
})
|
||||
vim.notify("none-ls setup processed from utils.lua", vim.log.levels.INFO)
|
||||
end
|
||||
|
||||
require("gitsigns").setup()
|
||||
|
||||
-- autopairs
|
||||
require('nvim-autopairs').setup{}
|
||||
|
||||
require('todo-comments').setup{}
|
||||
|
||||
-- copy to system clipboard
|
||||
vim.api.nvim_set_keymap( 'v', '<Leader>y', '"+y', {noremap = true})
|
||||
vim.api.nvim_set_keymap( 'n', '<Leader>y', ':%+y<CR>', {noremap = true})
|
||||
|
||||
-- paste from system clipboard
|
||||
vim.api.nvim_set_keymap( 'n', '<Leader>p', '"+p', {noremap = true})
|
||||
Reference in New Issue
Block a user