This commit is contained in:
snarmph 2026-01-12 06:34:27 +01:00
parent 189b33b5b3
commit 949f4d8565
5 changed files with 39 additions and 1 deletions

2
nvim/ftdetect/nu.vim Normal file
View file

@ -0,0 +1,2 @@
au BufRead,BufNewFile *.nu set filetype=nu

View file

@ -34,6 +34,7 @@ vim.o.updatetime = 100
vim.keymap.set("n", "<Esc><Esc>", ":noh<CR>", { silent = true })
vim.keymap.set("v", "ga", ":EasyAlign<CR>")
vim.keymap.set("v", "<leader>c", '"+y', { desc = "Copy to system clipboard" })
-- COLORSCHEME
-- vim.cmd.colorscheme "habamax.nvim"
@ -61,6 +62,7 @@ require("lspconfig").clangd.setup({
})
vim.lsp.enable('gopls')
vim.lsp.enable('rust-analyzer')
vim.diagnostic.config({
virtual_text = false,

View file

@ -50,4 +50,14 @@ return {
end
},
{ "junegunn/vim-easy-align" },
{
'LhKipp/nvim-nu',
build = ':TSInstall nu',
opts = {},
config = function()
-- vim.g.nu_enable_treesitter = false
-- vim.g.nu_enable_lsp = false
end
},
{ "nvimtools/none-ls.nvim" },
}

View file

@ -4,7 +4,8 @@ return {
branch = 'main',
build = ':TSUpdate',
opts = {
ensure_installed = { "lua", "vim", "json" },
ensure_installed = { "lua", "vim", "json", "nu", "c" },
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
config = function(_, opts)

23
nvim/syntax/nu.vim Normal file
View file

@ -0,0 +1,23 @@
" Basic Nushell syntax highlighting — minimal version
" Comments
syn match nuComment "#.*$"
hi def link nuComment Comment
" Strings
syn region nuString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region nuString start=+'+ skip=+\\\\\|\\'+ end=+'+
hi def link nuString String
" Numbers
syn match nuNumber "\v\d+(\.\d+)?"
hi def link nuNumber Number
" Keywords (you can expand this list)
syn keyword nuKeyword def let mut const if else for while match return
hi def link nuKeyword Keyword
" Built-ins and operators
syn match nuOperator "[|=<>:+*/-]"
hi def link nuOperator Operator