Compare commits
No commits in common. "2c42189b1ca415d42868deb390e1aeaee79657f9" and "327327241b4751e35d4860a78e2ea4f0e671e2f0" have entirely different histories.
2c42189b1c
...
327327241b
4 changed files with 15 additions and 160 deletions
|
@ -1,52 +1,2 @@
|
||||||
vim.opt.fillchars = {eob = " "}
|
vim.opt.fillchars = {eob = " "}
|
||||||
vim.cmd[[colorscheme dracula]]
|
vim.cmd[[colorscheme dracula]]
|
||||||
|
|
||||||
-- Set up nvim-cmp.
|
|
||||||
local cmp = require'cmp'
|
|
||||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
-- REQUIRED - you must specify a snippet engine
|
|
||||||
expand = function(args)
|
|
||||||
vim.fn["vsnip#anonymous"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
-- completion = cmp.config.window.bordered(),
|
|
||||||
-- documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'vsnip' }, -- For vsnip users.
|
|
||||||
-- { name = 'luasnip' }, -- For luasnip users.
|
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
cmp.event:on(
|
|
||||||
'confirm_done',
|
|
||||||
cmp_autopairs.on_confirm_done()
|
|
||||||
)
|
|
||||||
|
|
||||||
-- https://github.com/AstroNvim/AstroNvim/issues/648#issuecomment-1511728897
|
|
||||||
vim.api.nvim_create_augroup("neotree_autoopen", { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd("BufReadPre", {
|
|
||||||
desc = "Open neo-tree on enter",
|
|
||||||
group = "neotree_autoopen",
|
|
||||||
callback = function()
|
|
||||||
if not vim.g.neotree_opened then
|
|
||||||
vim.cmd "Neotree show"
|
|
||||||
vim.g.neotree_opened = true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,81 +1,3 @@
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
lspconfig.bashls.setup { capabilities = capabilities }
|
lspconfig.bashls.setup {}
|
||||||
lspconfig.nixd.setup { capabilities = capabilities }
|
lspconfig.nixd.setup {}
|
||||||
lspconfig.html.setup { capabilities = capabilities }
|
|
||||||
lspconfig.cssls.setup { capabilities = capabilities }
|
|
||||||
lspconfig.lua_ls.setup {
|
|
||||||
settings = {
|
|
||||||
capabilities = capabilities,
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
version = 'LuaJIT',
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
-- Get the language server to recognize the `vim` global
|
|
||||||
globals = {'vim'},
|
|
||||||
},
|
|
||||||
workspace = {
|
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
|
||||||
},
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require("formatter").setup {
|
|
||||||
filetype = {
|
|
||||||
["*"] = {
|
|
||||||
-- "formatter.filetypes.any" defines default configurations for any
|
|
||||||
-- filetype
|
|
||||||
require("formatter.filetypes.any").remove_trailing_whitespace
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
||||||
-- Instead of true it can also be a list of languages
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require('gitsigns').setup()
|
|
||||||
require('lualine').setup {
|
|
||||||
options = {
|
|
||||||
theme = 'dracula',
|
|
||||||
globalstatus = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
require("neo-tree").setup({
|
|
||||||
close_if_last_window = true,
|
|
||||||
window = {
|
|
||||||
width = 30,
|
|
||||||
},
|
|
||||||
filesystem = {
|
|
||||||
filtered_items = {
|
|
||||||
visible = false, -- when true, they will just be displayed differently than normal items
|
|
||||||
hide_dotfiles = false,
|
|
||||||
hide_gitignored = true,
|
|
||||||
hide_by_name = {},
|
|
||||||
hide_by_pattern = {},
|
|
||||||
always_show = {},
|
|
||||||
never_show = {},
|
|
||||||
never_show_by_pattern = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
follow_current_file = {
|
|
||||||
enabled = true,
|
|
||||||
leave_dirs_open = true,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
require('nvim-autopairs').setup()
|
|
||||||
require('todo-comments').setup()
|
|
||||||
require("scrollbar").setup()
|
|
||||||
|
|
|
@ -33,52 +33,30 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
# used to compile tree-sitter grammar
|
||||||
tree-sitter
|
tree-sitter
|
||||||
|
|
||||||
# https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
# https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
shellcheck
|
shellcheck
|
||||||
nixd
|
nixd
|
||||||
sumneko-lua-language-server
|
|
||||||
vscode-langservers-extracted
|
|
||||||
];
|
];
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
# you can use plugins from the pkgs
|
||||||
vim-which-key
|
vim-which-key
|
||||||
|
clangd_extensions-nvim
|
||||||
|
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-treesitter
|
nvim-treesitter
|
||||||
|
|
||||||
#telescope-nvim
|
# or you can use our function to directly fetch plugins from git
|
||||||
#telescope-fzf-native-nvim
|
(plugin "hrsh7th/nvim-cmp") # completion
|
||||||
|
|
||||||
(plugin "Mofiqul/dracula.nvim")
|
|
||||||
(plugin "neovim/nvim-lspconfig")
|
(plugin "neovim/nvim-lspconfig")
|
||||||
(plugin "lukas-reineke/indent-blankline.nvim")
|
(plugin "Mofiqul/dracula.nvim")
|
||||||
(plugin "lewis6991/gitsigns.nvim")
|
|
||||||
(plugin "nvim-lualine/lualine.nvim")
|
|
||||||
|
|
||||||
# plugins for completion
|
|
||||||
(plugin "hrsh7th/nvim-cmp")
|
|
||||||
(plugin "hrsh7th/cmp-nvim-lsp")
|
|
||||||
(plugin "hrsh7th/cmp-buffer")
|
|
||||||
(plugin "hrsh7th/cmp-path")
|
|
||||||
(plugin "hrsh7th/cmp-cmdline")
|
|
||||||
(plugin "hrsh7th/cmp-vsnip")
|
|
||||||
(plugin "hrsh7th/vim-vsnip")
|
|
||||||
|
|
||||||
# neo-tree and deps
|
|
||||||
(plugin "nvim-neo-tree/neo-tree.nvim")
|
(plugin "nvim-neo-tree/neo-tree.nvim")
|
||||||
(plugin "nvim-lua/plenary.nvim")
|
|
||||||
(plugin "nvim-tree/nvim-web-devicons")
|
|
||||||
(plugin "MunifTanjim/nui.nvim")
|
|
||||||
|
|
||||||
# to explore more
|
# this installs the plugin from 'lua' branch
|
||||||
(plugin "iamcco/markdown-preview.nvim")
|
(plugin "lukas-reineke/indent-blankline.nvim")
|
||||||
(plugin "sindrets/diffview.nvim")
|
|
||||||
(plugin "windwp/nvim-autopairs")
|
|
||||||
(plugin "mhartington/formatter.nvim")
|
|
||||||
(plugin "folke/todo-comments.nvim")
|
|
||||||
(plugin "petertriho/nvim-scrollbar")
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.shellAliases = {
|
||||||
|
rg = "rga";
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
|
@ -9,6 +13,7 @@
|
||||||
|
|
||||||
ripgrep = {
|
ripgrep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.ripgrep-all;
|
||||||
};
|
};
|
||||||
|
|
||||||
waybar = {
|
waybar = {
|
||||||
|
|
Loading…
Reference in a new issue