Skip to content

Commit

Permalink
move neovim as global module
Browse files Browse the repository at this point in the history
  • Loading branch information
solidsnakedev committed Nov 24, 2023
1 parent 402315c commit 6f637d4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion home-manager/homeserver/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
./../../modules/git.nix
./../../modules/tmux.nix
./../../modules/bat.nix
./local-modules/neovim.nix
./../../modules/neovim.nix
];

}
42 changes: 28 additions & 14 deletions ...nager/homeserver/local-modules/neovim.nix → modules/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ in
"diagnostic.warningSign" = "∆";
"hover.floatConfig.border" = true;
"hover.floatConfig.rounded" = true;
"tsserver.useLocalTsdk" = true;
"tsserver.tsdk" = "$./node_modules/typescript/lib";
languageserver = {
haskell = {
command = "haskell-language-server";
Expand Down Expand Up @@ -93,11 +95,16 @@ in
coc-json
coc-snippets
coc-eslint
coc-prettier
jsonc-vim

#Markdown
markdown-preview-nvim

# Language support

# Language syntax highlight
vim-nix
aiken-vim
{
plugin = haskell-vim;
config = ''
Expand All @@ -107,7 +114,6 @@ in
let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
'';
}

Expand All @@ -125,9 +131,12 @@ in
plugin = comment-nvim;
type = "lua";
config = ''
require('Comment').setup()
require('Comment').setup {
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
}
'';
}
nvim-ts-context-commentstring

{
plugin = todo-comments-nvim;
Expand All @@ -147,7 +156,7 @@ in
}

# Syntax Support
playground
# (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
Expand All @@ -158,6 +167,9 @@ in
disable = {"haskell"},
additional_vim_regex_highlighting = false,
},
context_commentstring = {
enable = true,
},
})
'';
}
Expand All @@ -171,7 +183,7 @@ in
options = {
mode = 'buffers',
themable = false,
numbers = 'buffer_id',
numbers = 'ordinal',
offsets = {
{filetype = 'NvimTree'}
},
Expand Down Expand Up @@ -287,13 +299,13 @@ in
plugin = material-nvim;
type = "lua";
config = ''
vim.g.material_style = "palenight"
vim.g.material_style = "deep ocean"
local material = require 'material'
local colors = require 'material.colors'
material.setup{
custom_highlights = {
LineNr = { fg = colors.main.paleblue },
CursorLineNr = { fg = colors.main.orange },
LineNr = { fg = colors.main.darkblue },
CursorLineNr = { fg = colors.main.yellow },
CocMenuSel = { fg = '#000000', bg = '#89DDFF' },
Structure = { fg = '#89DDFF'},
Identifier = { fg = '#F78C6C' },
Expand All @@ -309,7 +321,7 @@ in
plugin = sonokai;
type = "lua";
config = ''
vim.g.sonokai_diagnostic_text_highlight = 1
vim.g.sonokai_diagnostic_text_highlight = 1
-- vim.cmd[[colorscheme sonokai]]
'';
}
Expand Down Expand Up @@ -339,7 +351,7 @@ in
},
},
})
-- vim.cmd("colorscheme nightfox")
-- vim.cmd("colorscheme carbonfox")
'';
}

Expand All @@ -349,24 +361,26 @@ in
type = "lua";
config = ''
require('lualine').setup {
options = {
theme = 'material'
},
-- options = {
-- theme = 'powerline_dark'
-- },
sections = {
lualine_a = {
{
'filename',
path = 1,
}
},
lualine_b = {'branch', 'diff', 'diagnostics', 'g:coc_status'}
lualine_b = {'branch', 'diff', 'diagnostics','g:coc_status'}
},
}
'';
}
];

extraLuaConfig = ''
-- https://github.com/JoosepAlviste/nvim-ts-context-commentstring
vim.opt.updatetime = 100
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
Expand Down

0 comments on commit 6f637d4

Please sign in to comment.