aboutsummaryrefslogtreecommitdiffstats
path: root/nvim-primeagen
diff options
context:
space:
mode:
Diffstat (limited to 'nvim-primeagen')
-rw-r--r--nvim-primeagen/after/plugin/ale.lua4
-rw-r--r--nvim-primeagen/after/plugin/cmp.lua41
-rw-r--r--nvim-primeagen/after/plugin/luasnip.lua50
-rw-r--r--nvim-primeagen/after/plugin/treesitter.lua2
-rw-r--r--nvim-primeagen/lua/lemon/packer.lua2
5 files changed, 60 insertions, 39 deletions
diff --git a/nvim-primeagen/after/plugin/ale.lua b/nvim-primeagen/after/plugin/ale.lua
index da1415c..5575f9f 100644
--- a/nvim-primeagen/after/plugin/ale.lua
+++ b/nvim-primeagen/after/plugin/ale.lua
@@ -1,6 +1,6 @@
-- Set the configuration options for the plugin
local linters = {
- python = {'ruff'},
+ python = {'ruff', 'flake8'},
ocaml = {'merlin'},
cpp = {'clang'},
yaml = {'yamllint'},
@@ -9,7 +9,7 @@ local linters = {
}
local fixers = {
- python = {'ruff', 'isort', 'yapf', 'black'},
+ python = {'ruff', 'isort', 'yapf', 'black', 'pyright'},
go = {'gofmt'},
rust = {'rustfmt'},
}
diff --git a/nvim-primeagen/after/plugin/cmp.lua b/nvim-primeagen/after/plugin/cmp.lua
new file mode 100644
index 0000000..a85ee9b
--- /dev/null
+++ b/nvim-primeagen/after/plugin/cmp.lua
@@ -0,0 +1,41 @@
+local cmp = require("cmp")
+local luasnip = require("luasnip")
+
+cmp.setup({
+ snippet = {
+ expand = function(args)
+ luasnip.lsp_expand(args.body) -- For luasnip users
+ end,
+ },
+ sources = {
+ { name = "luasnip" },
+ { name = "path" },
+ },
+ mapping = {
+ ["<Tab>"] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_next_item()
+ -- they way you will only jump inside the snippet region
+ -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
+ elseif luasnip.expand_or_jumpable() then
+ luasnip.expand_or_jump()
+ elseif has_words_before() then
+ cmp.complete()
+ else
+ fallback()
+ end
+ end, { "i", "s" }),
+
+ ["<S-Tab>"] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_prev_item()
+ elseif luasnip.jumpable(-1) then
+ luasnip.jump(-1)
+ else
+ fallback()
+ end
+ end, { "i", "s" }),
+
+ -- ... Your other mappings ...
+ },
+})
diff --git a/nvim-primeagen/after/plugin/luasnip.lua b/nvim-primeagen/after/plugin/luasnip.lua
index 6ff1131..7f6bbde 100644
--- a/nvim-primeagen/after/plugin/luasnip.lua
+++ b/nvim-primeagen/after/plugin/luasnip.lua
@@ -4,43 +4,23 @@ local has_words_before = function()
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
-local luasnip = require("luasnip")
-local cmp = require("cmp")
-cmp.setup({
+local ls = require("luasnip")
- -- ... Your other configuration ...
+ls.filetype_extend("htmldjango", {"html"})
- mapping = {
+require("luasnip.loaders.from_lua").lazy_load({ paths = "~/.config/nvim/snippets" })
+require("luasnip.loaders.from_vscode").lazy_load()
- -- ... Your other mappings ...
-
- ["<Tab>"] = cmp.mapping(function(fallback)
- if cmp.visible() then
- cmp.select_next_item()
- -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
- -- they way you will only jump inside the snippet region
- elseif luasnip.expand_or_jumpable() then
- luasnip.expand_or_jump()
- elseif has_words_before() then
- cmp.complete()
- else
- fallback()
- end
- end, { "i", "s" }),
-
- ["<S-Tab>"] = cmp.mapping(function(fallback)
- if cmp.visible() then
- cmp.select_prev_item()
- elseif luasnip.jumpable(-1) then
- luasnip.jump(-1)
- else
- fallback()
- end
- end, { "i", "s" }),
-
- -- ... Your other mappings ...
- },
-
- -- ... Your other configuration ...
+ls.config.set_config({
+ history = true,
+ updateevents = "TextChanged, TextChangedI", --update changes as you type
+ enable_autosnippets = true,
+ ext_opts = {
+ [require("luasnip.util.types").choiceNode] = {
+ active = {
+ virt_text = { { ">" } },
+ },
+ },
+ },
})
diff --git a/nvim-primeagen/after/plugin/treesitter.lua b/nvim-primeagen/after/plugin/treesitter.lua
index 69adc98..3a7c091 100644
--- a/nvim-primeagen/after/plugin/treesitter.lua
+++ b/nvim-primeagen/after/plugin/treesitter.lua
@@ -1,6 +1,6 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
- ensure_installed = { "python", "bash", "javascript", "typescript", "c", "lua", "rust" },
+ ensure_installed = { "python", "bash", "javascript", "typescript", "c", "go", "css", "html", "htmldjango", "lua", "rust" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
diff --git a/nvim-primeagen/lua/lemon/packer.lua b/nvim-primeagen/lua/lemon/packer.lua
index b9d8782..ad6b084 100644
--- a/nvim-primeagen/lua/lemon/packer.lua
+++ b/nvim-primeagen/lua/lemon/packer.lua
@@ -86,7 +86,7 @@ return require('packer').startup(function(use)
}
use("folke/zen-mode.nvim")
- use("github/copilot.vim")
+ -- use("github/copilot.vim")
use("eandrju/cellular-automaton.nvim")
-- use("laytan/cloak.nvim")
use("jlanzarotta/bufexplorer")