mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
idek
This commit is contained in:
parent
482ec8e00a
commit
b2489ca8f0
3 changed files with 18 additions and 11 deletions
|
|
@ -1,6 +1,7 @@
|
|||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.phpactor.setup {}
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
|
@ -8,6 +9,11 @@ vim.keymap.set('n', '<leader>de', vim.diagnostic.open_float)
|
|||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
})
|
||||
-- Use LspAttach autocommand to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
|
|
@ -26,10 +32,12 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "gr", "<cmd>Telescope lsp_references<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>dt", "Telescope lsp_type_definitions<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>ds", "Telescope lsp_document_symbols<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>dt", "<cmd>Telescope lsp_type_definitions<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>ds", "<cmd>Telescope lsp_document_symbols<cr>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "<leader>dS", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", { buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>df', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
};
|
||||
dependancies = with pkgs; [
|
||||
ripgrep
|
||||
lazygit
|
||||
];
|
||||
full-dependancies = with pkgs; [
|
||||
gopls
|
||||
|
|
@ -85,6 +84,9 @@
|
|||
apps.full = flake-utils.lib.mkApp {
|
||||
drv = packages.full; name = "neovim"; exePath = "/bin/nvim";
|
||||
};
|
||||
apps.minimal = flake-utils.lib.mkApp {
|
||||
drv = packages.minimal; name = "neovim"; exePath = "/bin/nvim";
|
||||
};
|
||||
apps.default = apps.full;
|
||||
packages.default = packages.full;
|
||||
});
|
||||
|
|
|
|||
13
plugins.nix
13
plugins.nix
|
|
@ -7,14 +7,7 @@
|
|||
mini-nvim
|
||||
gitsigns-nvim
|
||||
oil-nvim
|
||||
neogit
|
||||
rose-pine
|
||||
];
|
||||
extra = with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
|
||||
#lsp
|
||||
nvim-lspconfig
|
||||
|
||||
#treesitter
|
||||
(nvim-treesitter.withPlugins
|
||||
|
|
@ -29,7 +22,6 @@
|
|||
tree-sitter-lua
|
||||
tree-sitter-markdown
|
||||
tree-sitter-markdown-inline
|
||||
tree-sitter-nix
|
||||
tree-sitter-php
|
||||
tree-sitter-python
|
||||
tree-sitter-yaml
|
||||
|
|
@ -38,4 +30,9 @@
|
|||
)
|
||||
nvim-treesitter-textobjects
|
||||
];
|
||||
extra = with pkgs.vimPlugins; [
|
||||
vim-nix
|
||||
#lsp
|
||||
nvim-lspconfig
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue