mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 10:22:24 +00:00
Compare commits
4 Commits
02fc29c482
...
a463212023
Author | SHA1 | Date | |
---|---|---|---|
|
a463212023 | ||
|
2457ade6eb | ||
|
88d52614a9 | ||
|
2c663347ee |
@ -144,6 +144,7 @@
|
||||
(import ./overlays/neovim-plugins.nix inputs)
|
||||
(import ./overlays/calibre-web.nix)
|
||||
(import ./overlays/disko.nix inputs)
|
||||
(import ./overlays/tree-sitter-bash.nix)
|
||||
];
|
||||
|
||||
# System types to support.
|
||||
|
@ -29,6 +29,9 @@
|
||||
lua = ''
|
||||
${builtins.readFile ./lsp.lua}
|
||||
|
||||
-- Prevent infinite log size (change this when debugging)
|
||||
vim.lsp.set_log_level("off")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
setup.Comment = { };
|
||||
setup.colorizer = { };
|
||||
setup.glow = { };
|
||||
|
||||
vim.o = {
|
||||
termguicolors = true; # Set to truecolor
|
||||
|
@ -3,19 +3,28 @@
|
||||
plugins = [
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
||||
with pkgs.tree-sitter-grammars; [
|
||||
tree-sitter-hcl
|
||||
tree-sitter-python
|
||||
tree-sitter-lua
|
||||
tree-sitter-nix
|
||||
tree-sitter-bash
|
||||
tree-sitter-fish
|
||||
tree-sitter-hcl
|
||||
tree-sitter-json
|
||||
tree-sitter-lua
|
||||
tree-sitter-markdown
|
||||
tree-sitter-markdown-inline
|
||||
tree-sitter-nix
|
||||
tree-sitter-python
|
||||
tree-sitter-toml
|
||||
tree-sitter-yaml
|
||||
tree-sitter-json
|
||||
]))
|
||||
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||
pkgs.vimPlugins.nginx-vim
|
||||
pkgs.vimPlugins.vim-helm
|
||||
pkgs.vimPlugins.vim-puppet
|
||||
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nmasur";
|
||||
version = "0.1";
|
||||
src = ../plugin;
|
||||
})
|
||||
];
|
||||
|
||||
setup."nvim-treesitter.configs" = {
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
{ pkgs, colors, ... }:
|
||||
|
||||
# Comes from nix2vim overlay:
|
||||
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||
pkgs.neovimBuilder {
|
||||
package = pkgs.neovim-unwrapped;
|
||||
inherit colors;
|
||||
|
@ -0,0 +1,8 @@
|
||||
expression: (apply_expression
|
||||
function: (apply_expression
|
||||
function: (select_expression
|
||||
attrpath: (attrpath) @writeshell (#match? @writeshell "^writeShell.*$")
|
||||
)
|
||||
)
|
||||
(indented_string_expression) @bash
|
||||
)
|
16
overlays/tree-sitter-bash.nix
Normal file
16
overlays/tree-sitter-bash.nix
Normal file
@ -0,0 +1,16 @@
|
||||
# Fix: bash highlighting doesn't work as of this commit:
|
||||
# https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029
|
||||
|
||||
_final: prev: {
|
||||
tree-sitter-grammars = prev.tree-sitter-grammars // {
|
||||
tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs
|
||||
(old: {
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-bash";
|
||||
rev = "493646764e7ad61ce63ce3b8c59ebeb37f71b841";
|
||||
sha256 = "sha256-gl5F3IeZa2VqyH/qFj8ey2pRbGq4X8DL5wiyvRrH56U=";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user