You've already forked nvim_config
Compare commits
11 Commits
b8850e216b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 54c7662216 | |||
| d2dd7e5059 | |||
|
|
939e3057a8 | ||
|
|
72cfef9698 | ||
|
|
93f5c4eeee | ||
|
|
1b710da032 | ||
| 5a603aaac0 | |||
| 40ddc8351a | |||
|
|
14185f2a77 | ||
|
|
2ed6432443 | ||
|
|
f3a4e44c19 |
@@ -41,3 +41,7 @@ There is also some remaps that I could not image going back to not using, since
|
|||||||
### Tabs:
|
### Tabs:
|
||||||
There has been added remaps for tabs, <leader>ct creates a new tab, <leader>qt closes a tab. If you are in netrw you can press t on a file to open it in a tab.
|
There has been added remaps for tabs, <leader>ct creates a new tab, <leader>qt closes a tab. If you are in netrw you can press t on a file to open it in a tab.
|
||||||
You can jump between tabs with gt, if you want to jump to a spesific tab you can use fx 2gt, to go to tab 2
|
You can jump between tabs with gt, if you want to jump to a spesific tab you can use fx 2gt, to go to tab 2
|
||||||
|
|
||||||
|
|
||||||
|
### Just a friendly reminder
|
||||||
|
It might be required to go above neovin version 0.10.0, as I have seen some funny errors with the LSP config, so to be safe if you have to option, go with version 0.11.0 or later as that just seams to work
|
||||||
|
|||||||
1
ftdetect/ansible.vim
Normal file
1
ftdetect/ansible.vim
Normal file
@@ -0,0 +1 @@
|
|||||||
|
au BufRead,BufNewFile *.yml set filetype=yaml.ansible
|
||||||
@@ -31,6 +31,8 @@ return {
|
|||||||
"terraformls",
|
"terraformls",
|
||||||
"pylsp",
|
"pylsp",
|
||||||
"bashls",
|
"bashls",
|
||||||
|
"docker_compose_language_service",
|
||||||
|
"dockerls",
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
@@ -51,12 +53,12 @@ return {
|
|||||||
executionEnvironment = { enabled = false },
|
executionEnvironment = { enabled = false },
|
||||||
validation = {
|
validation = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
-- lint = { enabled = true, path = 'ansible-lint' },
|
lint = { enabled = true, path = 'ansible-lint' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = { 'yaml', 'yml', 'ansible' },
|
filetypes = { 'yaml', 'yml', 'ansible' },
|
||||||
root_dir = lspconfig.util.root_pattern("roles", "playbooks", "Documents"),
|
root_dir = lspconfig.util.root_pattern("roles", "playbooks"),
|
||||||
single_file_support = false,
|
single_file_support = false,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
@@ -71,16 +73,6 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- ["terraformls"] = function ()
|
|
||||||
-- local lspconfig = require("lspconfig")
|
|
||||||
-- lspconfig["terraformls"].setup({
|
|
||||||
-- cmd = {"terraform-ls", "server"},
|
|
||||||
-- filetypes = { 'tf', 'hcl' },
|
|
||||||
-- root_dir = lspconfig.util.root_pattern("Documents"),
|
|
||||||
-- single_file_support = false,
|
|
||||||
-- })
|
|
||||||
-- end,
|
|
||||||
|
|
||||||
["bashls"] = function ()
|
["bashls"] = function ()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig["bashls"].setup({
|
lspconfig["bashls"].setup({
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ return {
|
|||||||
|
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) -- Lets you find files
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) -- Lets you find files
|
||||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {}) -- lets you find git files
|
|
||||||
vim.keymap.set('n', '<leader>ps', function() -- Lets you grep for a string
|
vim.keymap.set('n', '<leader>ps', function() -- Lets you grep for a string
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
branch = 'master',
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
-- A list of parser names, or "all"
|
-- A list of parser names, or "all"
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"vimdoc", "lua", "bash", "yaml", "terraform", "hcl", "python",
|
"vimdoc", "lua", "bash", "yaml", "terraform", "hcl", "python", "dockerfile",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
|
|||||||
9
lua/default/lazy/vault-inline.lua
Normal file
9
lua/default/lazy/vault-inline.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
'fcharlier/neovim-ansible-vault',
|
||||||
|
ft = { 'yaml', 'yaml.ansible', 'ansible-vault' }, -- Load for YAML, Ansible YAML and vault files
|
||||||
|
config = function()
|
||||||
|
-- Optional configuration
|
||||||
|
vim.g.ansible_vault_password_file = '~/.ansible/vault_pass'
|
||||||
|
-- or - vim.g.ansible_vault_identity = 'default@~/.ansible/vault_pass'
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
-- For some reason the lua lsp thinks that vim. is a undefined global :| just ignore when it tells you lies.
|
||||||
-- Settings leader as space. Leader is requred for all custom keybinds
|
-- Settings leader as space. Leader is requred for all custom keybinds
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
-- Enters netrw/file explore in nvim
|
-- Enters netrw/file explore in nvim
|
||||||
|
|||||||
27
nvim_keybinds_cheatsheet
Normal file
27
nvim_keybinds_cheatsheet
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Here is a list of the configured keybinds and what they do.
|
||||||
|
|
||||||
|
Now keep in mind, most of the keybinds are just standard vi/vim keybinds, therefor if you are wondering how to do things, try the default vi/vim keybinds first.
|
||||||
|
|
||||||
|
|
||||||
|
Finding files and file browsing
|
||||||
|
space+p+v: This sends you out into netrw where you can navigate between files and directoris.
|
||||||
|
space+p+f: This will open a prompt where you can search for file names, there is also a file preview.
|
||||||
|
space+p+s: This will open a grep search bar at the bottom of the nvim window where you can search for thigs in files, it will then open a windows where you can see all the files that contain what you have searched for.
|
||||||
|
|
||||||
|
Editing files
|
||||||
|
space+y: This lets you yoink into clipboard instead of the nvim buffer
|
||||||
|
space+p: This will let you paste from the nvim yoink buffer without overwriting it
|
||||||
|
ctrl+v: This puts you into a visual block
|
||||||
|
ctrl+y: This accepts the highlighted option in the auto complete box
|
||||||
|
ctrl+c: This has been mapped to esc
|
||||||
|
ctrl+w+d: This will show why there is a error or a warning
|
||||||
|
|
||||||
|
Using taps
|
||||||
|
space+c+t: This will open a new tap
|
||||||
|
space+q+t: This will close the tap you are in
|
||||||
|
space+g+t: This will go to the next tap
|
||||||
|
space+(number)+g+t: This will send you to the tap with you number you selected
|
||||||
|
|
||||||
|
Managing plugins and language servers
|
||||||
|
:Lazy (this will open the plugin manager window)
|
||||||
|
:Mason (This will open the lsp manager window)
|
||||||
Reference in New Issue
Block a user